Re: [w3c/IndexedDB] Projection Support (#366)

I conceptually like this as a user of IDB, but with my (Firefox) implementer hat on, it's not clear that this could be specified or implemented in a way that would provide meaningful performance increases in a post-Spectre world.  At least not without requiring massive increases in implementation complexity for browsers.

Right now I think it's preferable that more advanced use-cases like this be implemented in content, possibly using WASM, on top of existing/future block-storage APIs.  The smaller API and implementation surface is better suited for cross-browser support in potentially new engines, while also being more likely to have consistent performance characteristics across browsers.

### Structured Serialization Representation Limitations

The IDB data-model currently stores the values as largely opaque structured serialization blobs.  Key paths are evaluated in the IDB-using global at add/update time before they go async when they're sent to whatever the underlying storage implementation is (frequently via IPC).  The only case where IDB notionally evaluates key paths anywhere else is during index creation where existing values need to have their key paths extracted, which fundamentally requires the implementation to either spin up something that looks like a content global to load every value and extract key paths, or reuse the active upgrade transaction's global/etc.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/IndexedDB/issues/366#issuecomment-943614853

Received on Thursday, 14 October 2021 18:32:00 UTC