Open Bug 865870 Opened 12 years ago Updated 2 years ago

Try "include-what-you-use" on generated WebIDL bindings code

Categories

(Core :: DOM: Core & HTML, defect, P5)

defect

Tracking

()

People

(Reporter: mccr8, Unassigned)

References

(Blocks 2 open bugs, )

Details

(Whiteboard: [include-what-you-use])

njn used this to find a bunch of headers that didn't need to be included in Spidermonkey, improving compilation time by 15%. Now that I've rewritten how we generate forward declarations for WebIDL bindings, I find my eye wandering towards #includes. I wonder how much extra cruft we're including.
(In reply to Andrew McCreight [:mccr8] from comment #0) > njn used this to find a bunch of headers that didn't need to be included in > Spidermonkey, improving compilation time by 15%. I meant to link to bug 634839.
I would love this. This was mentioned as a very likely contributor to the slowness in bug 861587 comment 26...
Before you get too excited, you should read bug 634839 comment 29 -- my 15% speed-up disappeared when I measured more carefully. I'm now getting maybe a 1--2% speed-up. However, there's still hope -- I only worked on .cpp files and that only reduced the number of headers pulled in marginally. Trimming the #includes in .h files will hopefully have a much bigger effect.
So for what it's worth, I think the biggest impact on bindings would be figuring out why they're getting so much stuff included (assuming they are) and possibly splitting some stuff out into smaller headers that don't include the world....
Whiteboard: [include-what-you-use]
Yeah, I should probably do a similar pass over CC stuff that is included in nsISupportsImpl.h...
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.