Bug 103459

Summary: Shrink ShadowRoot and TreeScope.
Product: WebKit Reporter: Andreas Kling <kling>
Component: DOMAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: koivisto, ojan, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Proposed patch none

Description Andreas Kling 2012-11-27 15:44:46 PST
These could be smaller, we're wasting a lot of memory on ShadowRoots right now due to the inline DocumentOrderedMaps.
Comment 1 Andreas Kling 2012-11-27 15:45:50 PST
Created attachment 176351 [details]
Proposed patch
Comment 2 Antti Koivisto 2012-11-27 16:01:17 PST
Comment on attachment 176351 [details]
Proposed patch

r=me
Comment 3 Ojan Vafai 2012-11-27 16:01:35 PST
Comment on attachment 176351 [details]
Proposed patch

Mind adding COMPILE_ASSERTS for the sizes of TreeScope and ShadowRoot? Ideally you'd commit that first so that we could see the improvement from this patch.
Comment 4 Andreas Kling 2012-11-27 16:02:19 PST
(In reply to comment #3)
> (From update of attachment 176351 [details])
> Mind adding COMPILE_ASSERTS for the sizes of TreeScope and ShadowRoot? Ideally you'd commit that first so that we could see the improvement from this patch.

Sure, will do!
Comment 5 WebKit Review Bot 2012-11-27 16:35:08 PST
Comment on attachment 176351 [details]
Proposed patch

Clearing flags on attachment: 176351

Committed r135939: <http://trac.webkit.org/changeset/135939>
Comment 6 WebKit Review Bot 2012-11-27 16:35:12 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Andreas Kling 2012-11-27 16:36:11 PST
(In reply to comment #4)
> (In reply to comment #3)
> > (From update of attachment 176351 [details] [details])
> > Mind adding COMPILE_ASSERTS for the sizes of TreeScope and ShadowRoot? Ideally you'd commit that first so that we could see the improvement from this patch.
> 
> Sure, will do!

Aw crap, forgot about the CQ. Well, I'll slap some compile asserts on there anyway. Better late than never.
Comment 8 Ojan Vafai 2012-11-27 21:57:36 PST
Yeah, no worries. Better late than never indeed!