Bug 104310 - IndexedDB: put() should index asynchronously
Summary: IndexedDB: put() should index asynchronously
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P3 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-06 15:40 PST by Alec Flett
Modified: 2022-02-01 14:06 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alec Flett 2012-12-06 15:40:58 PST
As reported on chromium-html5@ - calling put() with lots of indexes can be a serious performance drag, probably partially because the frontend put() has to resolve all the values and send a giant blob of index data to the backend  - the value resolution happens synchronously, before the backend even sees it.

What we should probably be doing is sending the indexing data to the backend, and generating some kind of separate event in the frontend to generate the index data & send it to the backend using setIndexKeys()

This is kind of how createIndex() works, and it would probably have to have the same kind of semantics...
Comment 1 Sihui Liu 2022-02-01 14:06:20 PST
Not sure I completely understand the description since the bug is very old; but the index records are generated in the backend now, so calling put() should not block the web content process.