Contact emails
Spec change discussion
https://github.com/w3c/IndexedDB/issues/50
Spec
https://w3c.github.io/IndexedDB/#transaction-durability-hint
https://github.com/w3c/IndexedDB/commit/1a519e7f0a12de4acffc641d3254c1c2d34d380a
Summary
Allow developers to explicitly trade off durability for performance.
Currently after writing an IndexedDB transaction, Firefox does not flush to disk but Chrome does. This flush increases the durability (in the ACID sense) in that the transaction will be guaranteed to have been written all the way to disk rather than merely to an intermediate OS cache. However, this comes with a significant performance cost. On one test benchmark, not flushing caused a 10X+ performance improvement in adding new objects to a database.
Mechanically, this change adds a durability hint to IDBTransactionOptions. If not specified, this hint has the value "default" which tells the user agent to use the default durability behavior. A developer may now further specify "strict" (current behavior) or "relaxed" (faster new behavior) for this option.
Link to “Intent to Prototype” blink-dev discussion
https://groups.google.com/a/chromium.org/d/msg/blink-dev/aDDJXM8TZnk/xdhSlY-ZDwAJ
Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes.
Risks
Interoperability and Compatibility
Code using the new durability option will still run correctly on browsers that don't implement this feature, with degraded performance.
Firefox: No public signals. A position request has been filed (https://github.com/mozilla/standards-positions/issues/254), and the API surface here was co-designed with a Mozillan, but there is no official position.
Edge: No public signals
Safari: Opposed. Opposed to a previous proposal to make transactions non-durable by default, but no feedback on this proposal.
Web Developers: No signals
Ergonomics
There are no known risks associated with ergonomics.
Activation
This feature will be easy for developers to take advantage of immediately.
Is this feature fully tested by web-platform-tests? Link to test suite results from wpt.fyi.
https://wpt.fyi/results/IndexedDB/transaction-relaxed-durability.tentative.any.html
Entry on the feature dashboard
https://chromestatus.com/feature/5730701489995776
LGTM1
In general it would have been good to have had more vendor buy-in, but it's clear that other vendors don't see this as a prioritized area so I see no need to wait any longer. Especially since the compatibility risk is low (it's only a hint and hopefully it will rarely matter, unless the data is never ever flushed).
/Daniel
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CA%2B1_fV-_S2SdwKAk4jhnjznG-SkS9HwH-uG2hrKsML-JJbzMiQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/2ff893f2-b17f-cdfb-a868-5282a1d71b0f%40gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw8U-XR77RZUM6EuPzyCTHR3t0L3fTyuEAik4RF%2BT%2B%3DM%3DA%40mail.gmail.com.