Bug 136786

Summary: Un-inline Element constructor
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cmarcelo, commit-queue, darin, esprehn+autocc, kangil.han, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Chris Dumez 2014-09-12 11:20:06 PDT
Un-inline Element constructor as it is non-trivial and it does not seem to impact performance based on my testing. This reduces the stripped binary size by 8 Kb.
Comment 1 Chris Dumez 2014-09-12 11:23:37 PDT
Created attachment 238038 [details]
Patch
Comment 2 Benjamin Poulain 2014-09-12 11:28:17 PDT
Comment on attachment 238038 [details]
Patch

My rule of thumb is to put the create() function out of line, and the constructor inline.

Before landing, you should check if the 8k of binary size are not caused by a subclass that use an inline create().
Comment 3 Darin Adler 2014-09-12 17:58:21 PDT
(In reply to comment #2)
> My rule of thumb is to put the create() function out of line, and the constructor inline.

I also like to do that.

But I think the inlining that is happening here is more likely when the constructor is called from derived class constructors.
Comment 4 WebKit Commit Bot 2014-09-13 16:21:35 PDT
Comment on attachment 238038 [details]
Patch

Clearing flags on attachment: 238038

Committed r173605: <http://trac.webkit.org/changeset/173605>
Comment 5 WebKit Commit Bot 2014-09-13 16:21:40 PDT
All reviewed patches have been landed.  Closing bug.