| Summary: | CachedRawResource wastes 57K of Vector capacity | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||
| Component: | Page Loading | Assignee: | Chris Dumez <cdumez> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | beidson, cdumez, commit-queue, dbates, ews-watchlist, japhet, simon.fraser, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Simon Fraser (smfr)
2018-06-15 15:04:07 PDT
Vector<RedirectPair> m_redirectChain; in CachedRawResource. We never reserve capacity explicitly and only call append() on it. Looks like Vector has a default inlineCapacity of 0 but a minCapacity of 16. Note that the Vector contains ResourceResponse & ResponseRequest objects, which are large. Note that as long as the vector is empty, its capacity is 0, even though the default minCapacity is 16. However, as soon as you append one element to the Vector, capacity jumps from 0 to 16. Created attachment 342855 [details]
Patch
Comment on attachment 342855 [details] Patch Clearing flags on attachment: 342855 Committed r232897: <https://trac.webkit.org/changeset/232897> All reviewed patches have been landed. Closing bug. |