Bug 136786 - Un-inline Element constructor
Summary: Un-inline Element constructor
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-12 11:20 PDT by Chris Dumez
Modified: 2014-09-13 16:21 PDT (History)
7 users (show)

See Also:


Attachments
Patch (2.28 KB, patch)
2014-09-12 11:23 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.