WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
207377
IndexedDB: index cursor iteration is slow when there are a lot of index records from different object stores
https://bugs.webkit.org/show_bug.cgi?id=207377
Summary
IndexedDB: index cursor iteration is slow when there are a lot of index recor...
Carlos
Reported
2020-02-07 01:51:22 PST
Created
attachment 390067
[details]
Bug Reproducer The fact of having an object store with a lot of data is impacting in the performance of the rest of object stores, making the openCursor operation much slower when using an index (even if the object store that we want to read is almost empty). Note that when not using an index (IDBIndex), the performance seems to be not affected. Tested with Safari Technology preview release 100 (Safari 13.2, WebKit 15610.1.2.1) on Mac, and with Safari 13 on iOS. Steps to reproduce: 1- Open the attached reproducer, performance.html. An IndexedDB database with two objectStores (testStore and testStore2) is created. 2- Click in “Read data (object store)”, it reads the contents of the object store “testStore2” using the openCursor operation directly with the objectStore. The testStore2 is empty and the read finishes in a few milliseconds. 3- Click in “Read data (index)”, it reads the contents of the object store “testStore2” using the openCursor operation by an index of testStore2. The testStore2 is empty and the read finishes in a few milliseconds. 4- Click in “Populate database” and wait until it finishes. It will populate “testStore” with 250000 records and testStore2 with 10 records. 5- Click in “Read data (object store)”. Reading again testStore2 (which is almost empty, 10 records). It finishes in a few milliseconds. 6- Click in “Read data (index)”. Reading again objectStestStore2tore2 (which is almost empty, 10 records). It takes at least 200 ms
Attachments
Bug Reproducer
(3.30 KB, text/html)
2020-02-07 01:51 PST
,
Carlos
no flags
Details
Patch
(4.40 KB, patch)
2020-02-14 14:20 PST
,
Sihui Liu
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-02-08 13:28:12 PST
<
rdar://problem/59288679
>
Sihui Liu
Comment 2
2020-02-14 14:20:52 PST
Created
attachment 390818
[details]
Patch
Sihui Liu
Comment 3
2020-02-14 16:21:13 PST
The layout test failure is not caused by the patch.
WebKit Commit Bot
Comment 4
2020-02-17 09:44:59 PST
Comment on
attachment 390818
[details]
Patch Clearing flags on attachment: 390818 Committed
r256738
: <
https://trac.webkit.org/changeset/256738
>
WebKit Commit Bot
Comment 5
2020-02-17 09:45:00 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.
Top of Page
Format For Printing
XML
Clone This Bug