Giter Site home page Giter Site logo

Comments (6)

leplatrem avatar leplatrem commented on August 16, 2024 1

When https://bugzilla.mozilla.org/show_bug.cgi?id=1193394 will land in Firefox, it will be possible to have IndexedDB transactions across promises in Chrome+Firefox.

from kinto.js.

michielbdejong avatar michielbdejong commented on August 16, 2024

Not sure if this is relevant here, but just wanted to mention how important batching together writes to IndexedDB is, for performance. This is also a topic in localForage, we are trying to do automatic batching of writes there. The basic principle of that is:

  • you add or update one record -> it starts updating IndexedDB
  • you add or update more records -> it queues them up until IndexedDB is idle
  • the first transaction completes -> it creates a new batch transaction from everything that was added to the queue in the meantime

from kinto.js.

n1k0 avatar n1k0 commented on August 16, 2024

After a quick discussion with @ametaireau, here's the current state of our thinking on this:

  • Having transactions would provide a neat way to cancel local persistence operations;
  • It would also improve performances on large batches of persistence operations;
  • localStorage adapter would need a specific manually implemented solution to cover all the use cases;
  • We should heavily challenge if we actually need this feature: for now, nobody has explicitly expressed a need for it;
  • We should also discuss this with @leplatrem which I remember was having opinions on the matter.

Thoughts?

from kinto.js.

n1k0 avatar n1k0 commented on August 16, 2024

#303 has now landed and is a huge step towards this goal.

from kinto.js.

leplatrem avatar leplatrem commented on August 16, 2024

That's it! It landed!

Firefox 60 supports promises within IndexedDB transactions \o/

There is a lot of things that could be simplified, quite a huge amount of work.

from kinto.js.

michielbdejong avatar michielbdejong commented on August 16, 2024

Wow! :)

from kinto.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.