Changeset 209157 in webkit
- Timestamp:
- Nov 30, 2016 2:59:28 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r209156 r209157 1 2016-11-30 Brady Eidson <beidson@apple.com> 2 3 IndexedDB 2.0: Send operations off to the server in batches instead of one at a time. 4 https://bugs.webkit.org/show_bug.cgi?id=165221 5 6 Reviewed by Myles C. Maxfield. 7 8 No new tests (No observable behavior change). 9 10 On a profile of "Lots of writes to an IndexedDB", timer scheduling/firing presented as over 10% of the time. 11 12 This patch negates much of that. 13 14 * Modules/indexeddb/IDBTransaction.cpp: 15 (WebCore::IDBTransaction::pendingOperationTimerFired): Send 100 operations off to the server 16 before spinning the runloop, instead of only 1. 17 1 18 2016-11-30 Antoine Quint <graouts@apple.com> 2 19 -
trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
r209132 r209157 407 407 return; 408 408 409 if (!m_pendingTransactionOperationQueue.isEmpty()) { 409 // We want to batch operations together without spinning the runloop for performance, 410 // but don't want to affect responsiveness of the main thread. 411 // This number is a good compromise in ad-hoc testing. 412 static const size_t operationBatchLimit = 128; 413 414 for (size_t iterations = 0; !m_pendingTransactionOperationQueue.isEmpty() && iterations < operationBatchLimit; ++iterations) { 410 415 auto operation = m_pendingTransactionOperationQueue.takeFirst(); 411 416 m_transactionOperationsInProgressQueue.append(operation.get()); 412 417 operation->perform(); 413 418 414 // If this operation we just started has an associated IDBRequest, we might be able to send 415 // another operation to the server before it completes. 416 if (operation->idbRequest() && !m_pendingTransactionOperationQueue.isEmpty()) 417 schedulePendingOperationTimer(); 418 419 return; 419 if (!operation->nextRequestCanGoToServer()) 420 break; 421 420 422 } 421 423
Note: See TracChangeset
for help on using the changeset viewer.