Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 21ce77b3d34b2449c98a015ce9c724dde9ed9992
      
https://github.com/WebKit/WebKit/commit/21ce77b3d34b2449c98a015ce9c724dde9ed9992
  Author: Jer Noble <[email protected]>
  Date:   2026-04-28 (Tue, 28 Apr 2026)

  Changed paths:
    M Source/WTF/Scripts/generate-unified-source-bundles.py
    M Source/WebCore/Modules/pictureinpicture/PictureInPictureWindow.cpp
    M Source/WebCore/Modules/webaudio/OfflineAudioContext.cpp
    M Source/WebCore/Modules/webxr/WebXRInputSpace.cpp
    M Source/WebCore/Modules/webxr/WebXRSession.cpp
    M Source/WebCore/Modules/webxr/WebXRSystem.cpp
    M Source/WebCore/SaferCPPExpectations/NoDeleteCheckerExpectations
    M Source/WebCore/Scripts/generate-unified-sources.sh
    M Source/WebCore/Sources.txt
    M Source/WebCore/SourcesCocoa.txt
    M Source/WebCore/UnifiedSources-output.xcfilelist
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/accessibility/AXCrossProcessSearch.cpp
    M Source/WebCore/accessibility/AXLogger.cpp
    M Source/WebCore/accessibility/AccessibilityScrollView.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp
    M Source/WebCore/dom/DeviceMotionEvent.cpp
    M Source/WebCore/dom/DocumentImmersive.cpp
    M Source/WebCore/dom/DocumentOrShadowRootFullscreen.cpp
    M Source/WebCore/dom/DocumentType.cpp
    M Source/WebCore/dom/InternalObserverInspect.cpp
    M Source/WebCore/dom/NodeInlines.h
    M Source/WebCore/dom/ScriptedAnimationController.cpp
    M Source/WebCore/dom/XMLDocument.cpp
    M Source/WebCore/editing/cocoa/AutofillElements.cpp
    M Source/WebCore/history/CachedFrame.cpp
    M Source/WebCore/html/HTMLImageLoader.cpp
    M Source/WebCore/html/ModelDocument.cpp
    M Source/WebCore/html/track/TextTrackCue.cpp
    M Source/WebCore/html/track/WebVTTToken.h
    M Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
    M Source/WebCore/layout/integration/grid/LayoutIntegrationGridCoverage.cpp
    M Source/WebCore/page/DOMWindow.cpp
    M Source/WebCore/page/FrameTree.cpp
    M Source/WebCore/page/ImageAnalysisQueue.cpp
    M Source/WebCore/page/IntelligenceTextEffectsSupport.cpp
    M Source/WebCore/page/LocalFrame.cpp
    M Source/WebCore/page/PointerCaptureController.cpp
    M Source/WebCore/page/scrolling/ScrollLatchingController.cpp
    M 
Source/WebCore/platform/animation/values/paths/AcceleratedEffectBoxPath.cpp
    M Source/WebCore/platform/animation/values/paths/AcceleratedEffectBoxPath.h
    M Source/WebCore/platform/graphics/cairo/ImageUtilitiesCairo.cpp
    M Source/WebCore/platform/graphics/cg/GradientRendererCG.cpp
    M Source/WebCore/platform/graphics/cg/GradientRendererCG.h
    M Source/WebCore/rendering/RenderModel.cpp
    M Source/WebCore/rendering/SubtreeScrollbarChangesState.cpp
    M Source/WebCore/style/StyleInterpolationContext.h
    M Source/WebCore/style/StyleLocalPropertyRegistry.cpp
    M Source/WebCore/style/StyleScopeRuleSets.cpp

  Log Message:
  -----------
  [Build Speed] Group together source files requiring 
RenderStyle+GettersInlines.h into separate UnifiedBuild sources
https://bugs.webkit.org/show_bug.cgi?id=313363
rdar://175635833

Reviewed by Geoffrey Garen.

Source files that include expensive headers are now grouped together in
unified source bundles, reducing the number of translation units that
pay the parsing cost for those headers.

Previously, files needing RenderStyle+GettersInlines.h (a 3.7s parse
cost) were scattered across 190 unified source bundles. Most of those
bundles also contained files that didn't need the header, but paid
the cost anyway since unified sources share a single preprocessing
context. By tagging these files and grouping them together, the header
is now parsed in only 91 bundles instead of 190.

Measured impact on WebCore clean build:
    Frontend parsing: 8018s -> 7351s (-667s, -8.3%)
    Backend/Codegen: 558s -> 542s (-16s, -2.8%)
    RenderStyle+GettersInlines.h: 730s -> 339s (-391s, -54%)

RenderStyle+GettersInlines.h drops from the #2 most expensive WebCore
header to... #3, even while it's parsing cost dropped by more than half.

The implementation adds a general-purpose @header:<name> attribute
to the unified source generator. Files tagged with the same header
group name are placed into their own unified source bundles, separate
from untagged files. This prevents expensive headers from "leaking"
into bundles that don't need them.

The mechanism is extensible; other expensive headers can be targeted
the same way by tagging their includers in Sources.txt with a new
@header:<name> group. No header refactoring or code changes are
required; only the Sources.txt tagging and a bundle count parameter
in generate-unified-sources.sh.

Compensating #includes were added to several .cpp files that
previously relied on transitive includes from other files in their
unified source bundle. Regrouping exposed these missing direct
includes.

* Source/WTF/Scripts/generate-unified-source-bundles.py:
(SourceFile.__init__):
(parse_args):
(main):
* Source/WebCore/Scripts/generate-unified-sources.sh:
* Source/WebCore/Sources.txt:
* Source/WebCore/SourcesCocoa.txt:
* Source/WebCore/UnifiedSources-output.xcfilelist:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/accessibility/AXCrossProcessSearch.cpp:
* Source/WebCore/accessibility/AXLogger.cpp:
* Source/WebCore/accessibility/AccessibilityScrollView.cpp:
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
* Source/WebCore/dom/DeviceMotionEvent.cpp:
* Source/WebCore/dom/InternalObserverInspect.cpp:
* Source/WebCore/editing/cocoa/AutofillElements.cpp:
* Source/WebCore/history/CachedFrame.cpp:
* Source/WebCore/html/ModelDocument.cpp:
* Source/WebCore/inspector/agents/InspectorDOMAgent.cpp:
* Source/WebCore/layout/integration/grid/LayoutIntegrationGridCoverage.cpp:
(WebCore::LayoutIntegration::printLegacyGridReasons):
(WebCore::LayoutIntegration::printTextForSubtree): Deleted.
* Source/WebCore/page/FrameTree.cpp:
* Source/WebCore/page/ImageAnalysisQueue.cpp:
* Source/WebCore/page/IntelligenceTextEffectsSupport.cpp:
* Source/WebCore/page/LocalFrame.cpp:
* Source/WebCore/page/scrolling/ScrollLatchingController.cpp:
* Source/WebCore/platform/animation/values/paths/AcceleratedEffectBoxPath.cpp:
* Source/WebCore/platform/animation/values/paths/AcceleratedEffectBoxPath.h:
* Source/WebCore/platform/graphics/cg/GradientRendererCG.cpp:
* Source/WebCore/platform/graphics/cg/GradientRendererCG.h:
(WebCore::GradientRendererCG::createGradientBySampling):
* Source/WebCore/rendering/RenderModel.cpp:
* Source/WebCore/rendering/SubtreeScrollbarChangesState.cpp:
* Source/WebCore/style/StyleLocalPropertyRegistry.cpp:

Canonical link: https://commits.webkit.org/312240@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to