by eweitz · 5y ago · 0 comments
In my brief experiment, it was 12% faster to read from the web Cache API [1], re-parse and re-transform that nested object than to read the fully transformed object using IndexedDB via idb-keyval [2]. That surprised me! I went on to learn that IndexedDB does a structured clone as part of such reads, which I suspect is the main cause of slowness in my use case.
Related commits to reproduce that finding are in [3], specifically [4].
[1] https://developer.mozilla.org/en-US/docs/Web/API/Cache
[2] https://github.com/jakearchibald/idb-keyval
[3] https://github.com/eweitz/ideogram/pull/285
[4] https://github.com/eweitz/ideogram/pull/285/commits/90e374a0...
No comments yet.