Summary: | CachedScript could have a copy-free path for all-ASCII scripts. | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andreas Kling <kling> | ||||||||||
Component: | WebCore JavaScript | Assignee: | Andreas Kling <kling> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | aestes, benjamin, cdumez, cmarcelo, commit-queue, japhet, keith_miller, kling, koivisto, mark.lam, msaboff, saam | ||||||||||
Priority: | P2 | Keywords: | Performance | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Andreas Kling
2015-12-11 16:52:27 PST
Created attachment 267242 [details]
Patch for EWS
Created attachment 267254 [details]
Patch
Created attachment 267256 [details]
Patch
Comment on attachment 267256 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=267256&action=review Nice, r=me > Source/WebCore/loader/cache/CachedScript.h:65 > + enum ASCIIResourceOptimizationState { Unknown, Optimized, NotOptimized }; > + ASCIIResourceOptimizationState m_ASCIIOptimizationState { Unknown }; Maybe this could be more explicit about what "Optimized" means? Something along the lines of DataAndDecodedStringHaveSameBytes. Created attachment 267265 [details]
Patch for landing
Comment on attachment 267265 [details] Patch for landing Clearing flags on attachment: 267265 Committed r194017: <http://trac.webkit.org/changeset/194017> All reviewed patches have been landed. Closing bug. Comment on attachment 267256 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=267256&action=review > Source/WebCore/loader/cache/CachedScript.cpp:74 > + return encoding == "UTF-8" || encoding == "ISO-8859-1" || encoding == "ASCII"; This seems to be way too conservative. Almost all encodings would answer yes for this. Pretty much everything except for UTF-16 and UTF-32, and I think TextEncoding can answer this question. It's strange to be asking this given just a string rather than TextEncoding. |