IndexedDB 2.0: Send operations off to the server in batches instead of one at a time Turns out timer scheduling and/or dispatching to the runloop is expensive. On a profile of "100,000 writes to an IDB", timer scheduling/firing presented as 10+% of the time. This patch negates much of that.
Created attachment 295767 [details] Patch v1
GTK build breakage is not because of this patch.
Comment on attachment 295767 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=295767&action=review > Source/WebCore/Modules/indexeddb/IDBTransaction.cpp:412 > + static const size_t operationBatchLimit = 128; IIRC Ben had an argument against const variables being static. I can't remember it but I think it was about how static variables have to live in their own memory region and therefore have to be a load rather than an immediate. > Source/WebCore/Modules/indexeddb/IDBTransaction.cpp:-417 > - schedulePendingOperationTimer(); I assume you are scheduling the operation for the next chunk somewhere else?
(In reply to comment #3) > Comment on attachment 295767 [details] > Patch v1 > > View in context: > https://bugs.webkit.org/attachment.cgi?id=295767&action=review > > > Source/WebCore/Modules/indexeddb/IDBTransaction.cpp:412 > > + static const size_t operationBatchLimit = 128; > > IIRC Ben had an argument against const variables being static. I can't > remember it but I think it was about how static variables have to live in > their own memory region and therefore have to be a load rather than an > immediate. "An expert" needs to figure this out for sure, because as is there are 5958 results in 1264 files searching for "static const" > > Source/WebCore/Modules/indexeddb/IDBTransaction.cpp:-417 > > - schedulePendingOperationTimer(); > > I assume you are scheduling the operation for the next chunk somewhere else? Correct! Thanks.
Comment on attachment 295767 [details] Patch v1 Clearing flags on attachment: 295767 Committed r209157: <http://trac.webkit.org/changeset/209157>
All reviewed patches have been landed. Closing bug.