Summary: | JSObject wastes too much memory on unused property slots | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Filip Pizlo <fpizlo> | ||||||
Component: | JavaScriptCore | Assignee: | Filip Pizlo <fpizlo> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | zan | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Bug Depends on: | 90336 | ||||||||
Bug Blocks: | |||||||||
Attachments: |
|
Description
Filip Pizlo
2012-06-29 00:43:12 PDT
Created attachment 150108 [details]
the patch
Comment on attachment 150108 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=150108&action=review Overall, looks good. r=me with suggestions :-) > Source/JavaScriptCore/runtime/JSObject.h:351 > +#if JSNonFinalObject_inlineStorageCapacity I guess this is to make it easier if we want to change back to non-zero inline storage for JSNonFinalObjects in the future? > Source/JavaScriptCore/runtime/JSObject.h:361 > + globalData, structure, Why on a separate line? > Source/JavaScriptCore/runtime/JSObject.h:574 > + if (propertyStorageCapacity() == inlineStorageCapacity()) You could assert that propertyStorageCapacity() >= inlineStorageCapacity() at the beginning of the function and then return propertyStorageCapacity() == inlineStorageCapacity(). Two less lines! Comment on attachment 150108 [details]
the patch
Found some bugs. New patch on the way.
Created attachment 150276 [details]
the patch
Comment on attachment 150276 [details]
the patch
r=me
Landed in http://trac.webkit.org/changeset/121605 Re-opened since this is blocked by 90336 Relanded with fixes in http://trac.webkit.org/changeset/121633. |