RESOLVED FIXED 165221
IndexedDB 2.0: Send operations off to the server in batches instead of one at a time
https://bugs.webkit.org/show_bug.cgi?id=165221
Summary IndexedDB 2.0: Send operations off to the server in batches instead of one at...
Brady Eidson
Reported 2016-11-30 14:15:43 PST
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.
Attachments
Patch v1 (2.60 KB, patch)
2016-11-30 14:17 PST, Brady Eidson
no flags
Brady Eidson
Comment 1 2016-11-30 14:17:33 PST
Created attachment 295767 [details] Patch v1
Brady Eidson
Comment 2 2016-11-30 14:43:49 PST
GTK build breakage is not because of this patch.
Myles C. Maxfield
Comment 3 2016-11-30 14:55:09 PST
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?
Brady Eidson
Comment 4 2016-11-30 14:56:52 PST
(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.
WebKit Commit Bot
Comment 5 2016-11-30 14:59:49 PST
Comment on attachment 295767 [details] Patch v1 Clearing flags on attachment: 295767 Committed r209157: <http://trac.webkit.org/changeset/209157>
WebKit Commit Bot
Comment 6 2016-11-30 14:59:52 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.