Closed
Bug 1311598
Opened 8 years ago
Closed 8 years ago
Stylo: split ServoBindings.h into separate files to reduce compile time of adding binding functions
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: xidorn, Assigned: xidorn)
References
Details
Attachments
(4 files)
IIUC, in majority of times, ServoBindings.h is included in a header file just for the types and their traits defined there, and only a handful of files really need to know the binding functions. However, most of changes to this file are for adding / changing the binding functions, which leads to tons of unnecessary recompile.
I think we can split ServoBindings.h into ServoBindingTypes.h and ServoBindings.h, and change majority of includes to just ServoBindingTypes.h.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 6•8 years ago
|
||
So before this change, adding a binding function (touch ServoBindings.h) takes more than 10min to rebuild on my machine. After this change, it takes less than 1m30s.
Assignee: nobody → xidorn+moz
Comment 7•8 years ago
|
||
mozreview-review |
Comment on attachment 8803760 [details]
Bug 1311598 part 1 - Move PropertyValuePair::operator== into cpp file.
https://reviewboard.mozilla.org/r/87894/#review86870
Attachment #8803760 -
Flags: review?(bbirtles) → review+
Comment 8•8 years ago
|
||
mozreview-review |
Comment on attachment 8803761 [details]
Bug 1311598 part 2 - Declare Servo_GetStyle* functions in nsStyleContext.h.
https://reviewboard.mozilla.org/r/87896/#review86888
Attachment #8803761 -
Flags: review?(cam) → review+
Comment 9•8 years ago
|
||
mozreview-review |
Comment on attachment 8803762 [details]
Bug 1311598 part 3 - Add include ServoBindings.h to files need it.
https://reviewboard.mozilla.org/r/87898/#review86890
Attachment #8803762 -
Flags: review?(cam) → review+
Comment 10•8 years ago
|
||
mozreview-review |
Comment on attachment 8803763 [details]
Bug 1311598 part 4 - Split binding types from ServoBindings.h into ServoBindingTypes, and merge ServoBindingHelpers into it.
https://reviewboard.mozilla.org/r/87900/#review86882
::: servo/components/style/binding_tools/regen.py:243
(Diff revision 2)
> "--ignore-methods",
> ],
> "match_headers": [
> "ServoBindingList.h",
> "ServoBindings.h",
> + "ServoBindingTyps.h",
Does fixing the typo cause any difference to what gets generated?
::: servo/components/style/binding_tools/regen.py:249
(Diff revision 2)
> "nsStyleStructList.h",
> ],
> "files": [
> "{}/dist/include/mozilla/ServoBindings.h",
> ],
>
Nit: keep this blank just before the comment.
Attachment #8803763 -
Flags: review?(cam) → review+
Assignee | ||
Comment 11•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8803763 [details]
Bug 1311598 part 4 - Split binding types from ServoBindings.h into ServoBindingTypes, and merge ServoBindingHelpers into it.
https://reviewboard.mozilla.org/r/87900/#review86882
> Does fixing the typo cause any difference to what gets generated?
Oops. Actually, no. That probably means I don't need this line at all.
Comment 12•8 years ago
|
||
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ef6a591da5f4
part 1 - Move PropertyValuePair::operator== into cpp file. r=birtles
https://hg.mozilla.org/integration/mozilla-inbound/rev/32d31d45bc1c
part 2 - Declare Servo_GetStyle* functions in nsStyleContext.h. r=heycam
https://hg.mozilla.org/integration/mozilla-inbound/rev/b88f09bddf8e
part 3 - Add include ServoBindings.h to files need it. r=heycam
https://hg.mozilla.org/integration/mozilla-inbound/rev/5af7afe20e40
part 4 - Split binding types from ServoBindings.h into ServoBindingTypes, and merge ServoBindingHelpers into it. r=heycam
Comment 13•8 years ago
|
||
(In reply to Xidorn Quan [:xidorn] (UTC+10) from comment #11)
> Comment on attachment 8803763 [details]
> Bug 1311598 part 4 - Split binding types from ServoBindings.h into
> ServoBindingTypes, and merge ServoBindingHelpers into it.
>
> https://reviewboard.mozilla.org/r/87900/#review86882
>
> > Does fixing the typo cause any difference to what gets generated?
>
> Oops. Actually, no. That probably means I don't need this line at all.
The `match_headers` thing is no longer used AFAIK, so you can drop them all and the generated output shouldn't change.
Assignee | ||
Comment 14•8 years ago
|
||
The Servo side change is servo/servo#13904.
Comment 15•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ef6a591da5f4
https://hg.mozilla.org/mozilla-central/rev/32d31d45bc1c
https://hg.mozilla.org/mozilla-central/rev/b88f09bddf8e
https://hg.mozilla.org/mozilla-central/rev/5af7afe20e40
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in
before you can comment on or make changes to this bug.
Description
•