Add a relaxedDurability option to IDBDatabase transaction #18817
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This plumbs a new optional relaxedDurability flag from the IDBDatabase
transaction web api in the renderer to the IndexedDBBackingStore
in the browser.
Flushing after every file write is very expensive and burns power,
and so it's desirable to eventually experiment with turning this
option off by default. It is currently implicitly on. This patch
doesn't change the default, but only exposes the option.
Results from my local Linux machine on the issue 785305 test case:
num | master | patch
------+-----------+---------
1000 | 41386 ms | 1843 ms
5100 | 214892 ms | 14283 ms
10000 | 423271 ms | 34271 ms
This test case had extremely variable output times, but this seems
to be about a 10x performance improvement on that test case.
Bug: 965883, 785305
Change-Id: Id54b65bd462f0983f8af44abc26575135d35f535
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1775557
Commit-Queue: enne <enne@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693419}