RESOLVED FIXED 235484
LocalStorage values should be 8-bit strings in memory if possible
https://bugs.webkit.org/show_bug.cgi?id=235484
Summary LocalStorage values should be 8-bit strings in memory if possible
Ben Nham
Reported 2022-01-22 15:29:37 PST
LocalStorage values should be 8-bit strings in memory if possible
Attachments
Patch (1.70 KB, patch)
2022-01-22 15:34 PST, Ben Nham
no flags
Ben Nham
Comment 1 2022-01-22 15:34:19 PST
Chris Dumez
Comment 2 2022-01-24 07:26:12 PST
Comment on attachment 449739 [details] Patch r=me
Radar WebKit Bug Importer
Comment 3 2022-01-24 11:13:08 PST
Ben Nham
Comment 4 2022-02-03 13:34:20 PST
Comment on attachment 449739 [details] Patch This ended up being only neutral on Membuster. One of the websites in the benchmark has 1.4MB of LocalStorage values in its database. Unfortunately, the values are almost-ASCII but not quite; the site seems to store WebFont css in LocalStorage, and the CSS has a non-ASCII smiley face in it: @font-face { // ... src: local('☺︎'), // ... } See https://www.paulirish.com/2009/bulletproof-font-face-implementation-syntax/#smiley for more details. So the value can't actually be parsed into an 8-bit string and this optimization does nothing for that website. This is still worth doing though, so I'll land it.
Yusuke Suzuki
Comment 5 2022-02-03 14:02:17 PST
For this kind of long-living values, making it 8bit as much as possible really makes sense! Nice
EWS
Comment 6 2022-02-03 14:13:52 PST
Committed r289078 (246784@main): <https://commits.webkit.org/246784@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 449739 [details].
Note You need to log in before you can comment on or make changes to this bug.