Closed Bug 1651714 Opened 4 years ago Closed 4 years ago

Reduce includes of TabMessageUtils.h

Categories

(Core :: DOM: Content Processes, task)

task

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: sg, Assigned: sg)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

TabMessageUtils.h is expensive to include. According to a ClangBuildAnalyer measurement, it is the 2nd most expensive header and included 317 times (on Linux):

*** Expensive headers:
532744 ms: /home/simon/work/fuzzy/obj-x86_64-pc-linux-gnu-optimized/ipc/ipdl/_ipdlheaders/mozilla/dom/DOMTypes.h (included 306 times, avg 1740 ms), included via:
  ClearSiteData.cpp HttpBaseChannel.h  (4272 ms)
  RemoteDecoderModule.o ContentChild.h BrowserBridgeChild.h PBrowserBridgeChild.h PBrowserBridge.h  (3516 ms)
  FOGIPC.cpp ContentChild.h BrowserBridgeChild.h PBrowserBridgeChild.h PBrowserBridge.h  (3394 ms)
  ActorsParent.cpp PBackgroundParent.h PBackground.h  (3376 ms)
  ChildSHistory.cpp ContentChild.h BrowserBridgeChild.h PBrowserBridgeChild.h PBrowserBridge.h  (3361 ms)
  FileChannelChild.cpp ContentChild.h BrowserBridgeChild.h PBrowserBridgeChild.h PBrowserBridge.h  (3341 ms)
  ...
 
461832 ms: /home/simon/work/fuzzy/obj-x86_64-pc-linux-gnu-optimized/dist/include/mozilla/dom/TabMessageUtils.h (included 317 times, avg 1456 ms), included via:
  PProcessHangMonitor.cpp  (5059 ms)
  PGMPTimer.cpp PGMPParent.h  (3436 ms)
  RDDProcessImpl.o RDDProcessImpl.h RDDParent.h PRDDParent.h  (3216 ms)
  RDDProcessHost.o RDDChild.h PRDDChild.h  (3127 ms)
  RDDChild.o RDDChild.h PRDDChild.h  (3066 ms)
  RDDParent.o RDDParent.h PRDDParent.h  (3018 ms)
  ...

Actually, at most places only the type defintions are needed, not the IPDLParamTraits along with their dependencies.

With these changes, on my Linux analysis with ClangBuildAnalyzer, the
top two expensive headers, DOMTypes.h and TabMessageUtils.h are no longer
among the 30 most expensive headers.

Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b30958982514 Reduce expensive includes for TabMessageUtils.h. r=smaug
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: