Bug 200486 - IndexedDB deleteIndex() is very slow
Summary: IndexedDB deleteIndex() is very slow
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: All Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-08-06 16:12 PDT by jleis
Modified: 2020-02-14 17:17 PST (History)
2 users (show)

See Also:


Attachments
A simple html/js page that demonstrates indexeddb performance. (2.79 KB, text/html)
2019-08-07 11:30 PDT, jleis
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description jleis 2019-08-06 16:12:34 PDT
Compared to other modern browsers, the delete performance of indexeddb records is very slow on webkit/safari.

Here is a jsfiddle that demonstrates the issue.  https://jsfiddle.net/pzur4mtb/3/

Using the same macbook pro, mojave 10.14.6, safari 12.1.2.

On Chrome, the delete process takes around 2 seconds.
On Safari, it takes upwards of 16 seconds.

The issue can be replicated on all devices that support safari.

(I tried to test on webkit archive directly, but it errors trying to load sqlite files)
Comment 1 Alexey Proskuryakov 2019-08-06 16:45:47 PDT
This doesn't work for me on JSFiddle (SecurityError: IDBFactory.open() called in an invalid security context). Could you please upload the test here?
Comment 2 Radar WebKit Bug Importer 2019-08-06 16:46:02 PDT
<rdar://problem/54010354>
Comment 3 jleis 2019-08-07 11:30:26 PDT
Created attachment 375722 [details]
A simple html/js page that demonstrates indexeddb performance.
Comment 4 Sihui Liu 2020-02-14 17:17:31 PST
Tested the page in Safari Technology Preview 100.

Database initialised 
bulkPut()
=========
10000 PUT operations queued in 57ms

bulkDelete()
=========
10000 DELETE operations queued in 35ms

Put Transaction completed in 1427ms.
Delete Transaction completed in 2176ms.