| Summary: | CachedResource should purge SharedBuffer if it is a particular type | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Yusuke Suzuki <ysuzuki> |
| Component: | Page Loading | Assignee: | Yusuke Suzuki <ysuzuki> |
| Status: | NEW --- | ||
| Severity: | Normal | CC: | Basuke.Suzuki, beidson, ggaren, simon.fraser |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=208683 | ||
|
Description
Yusuke Suzuki
2020-02-11 01:05:02 PST
I’ll try this tomorrow. Plan is using Variant<SharedBuffer, String, ...> as data Seems that blink folks are doing this. We should try. https://docs.google.com/document/d/1v0yTAZ6wkqX2U_M6BNIGUJpM1s0TIw1VsqpxoL7aciY/edit#heading=h.hydebxiwp5hv We have a path using SharedBuffer as a content when it is ASCII. And seems that Membuster is using this path mainly, so maybe, this does not affect on memory usage of Membuster. But for image case, we should do it. And still, we should do it, but I'll check later since this would not affect on Membuster result. For CachedImage case, // On Mac the NSData inside the SharedBuffer can be secretly appended to without the SharedBuffer's knowledge. // We use SharedBuffer's ability to wrap itself inside CFData to get around this, ensuring that ImageIO is // really looking at the SharedBuffer. We are already doing this, cool. Other possibility is, 1. non-ASCII string source code 2. script source code compression 3. style sheet source code compression (In reply to Yusuke Suzuki from comment #4) > For CachedImage case, > > // On Mac the NSData inside the SharedBuffer can be secretly appended to > without the SharedBuffer's knowledge. > // We use SharedBuffer's ability to wrap itself inside CFData to get around > this, ensuring that ImageIO is > // really looking at the SharedBuffer. > > We are already doing this, cool. > > Other possibility is, > > 1. non-ASCII string source code > 2. script source code compression > 3. style sheet source code compression Wait, I need to check whether ImageIO is using this buffer directly or doing some fancy buffering internally. |