Bug 202570 - Clean up some includes to make the build a bit faster: DOMPromise
Summary: Clean up some includes to make the build a bit faster: DOMPromise
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-10-04 01:10 PDT by Tim Horton
Modified: 2019-10-04 13:01 PDT (History)
27 users (show)

See Also:


Attachments
Patch (93.57 KB, patch)
2019-10-04 01:11 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (94.06 KB, patch)
2019-10-04 02:03 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (95.07 KB, patch)
2019-10-04 02:15 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (95.49 KB, patch)
2019-10-04 02:23 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (88.86 KB, patch)
2019-10-04 09:49 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (89.40 KB, patch)
2019-10-04 09:56 PDT, Tim Horton
commit-queue: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2019-10-04 01:10:55 PDT
Clean up some includes to make the build a bit faster: DOMPromise
Comment 1 Tim Horton 2019-10-04 01:11:46 PDT
Created attachment 380194 [details]
Patch
Comment 2 Tim Horton 2019-10-04 01:12:34 PDT
Comment on attachment 380194 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=380194&action=review

> Source/WebCore/ChangeLog:13
> +        One remains (FetchBodyConsumer.h); I leave it as an exercise to the reader.

Really, it's too hard for me (I'll solicit assistance tomorrow). But also it doesn't seem to change the outcome any.
Comment 3 Tim Horton 2019-10-04 01:29:24 PDT
Welp, mac-debug builds, who needs all those orange bubbles anyway.
Comment 4 Tim Horton 2019-10-04 02:03:04 PDT
Created attachment 380199 [details]
Patch
Comment 5 Tim Horton 2019-10-04 02:15:42 PDT
Created attachment 380202 [details]
Patch
Comment 6 Tim Horton 2019-10-04 02:23:56 PDT
Created attachment 380204 [details]
Patch
Comment 7 Sam Weinig 2019-10-04 09:19:13 PDT
Comment on attachment 380204 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=380204&action=review

> Source/WebCore/ChangeLog:10
> +        Apply some profile-guided optimizations to our headers.

I do not think "profile-guided optimizations" means what you think it means.

> Source/WebCore/ChangeLog:14
> +        In my testing, this is worth a reliable 5-6% on the WebCore Build Benchmark.

Very nice.
Comment 8 Tim Horton 2019-10-04 09:42:15 PDT
Comment on attachment 380204 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=380204&action=review

>> Source/WebCore/ChangeLog:10
>> +        Apply some profile-guided optimizations to our headers.
> 
> I do not think "profile-guided optimizations" means what you think it means.

They're (header) optimizations guided by profiling (the build)! Don't let the language police win! (but yes, it was a bit of a joke)
Comment 9 Tim Horton 2019-10-04 09:49:19 PDT
Created attachment 380224 [details]
Patch
Comment 10 Tim Horton 2019-10-04 09:56:20 PDT
Created attachment 380225 [details]
Patch
Comment 11 Sam Weinig 2019-10-04 10:05:59 PDT
(In reply to Tim Horton from comment #8)
> Comment on attachment 380204 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=380204&action=review
> 
> >> Source/WebCore/ChangeLog:10
> >> +        Apply some profile-guided optimizations to our headers.
> > 
> > I do not think "profile-guided optimizations" means what you think it means.
> 
> They're (header) optimizations guided by profiling (the build)! Don't let
> the language police win! (but yes, it was a bit of a joke)

Ah, in honor of the movie "Joker", in theaters worldwide today.
Comment 12 Tim Horton 2019-10-04 11:30:35 PDT
This gets JSDOMPromiseDeferred from 295->85 separate parses, and JSDOMGlobalObject from 338->286 (still the hottest header).
Comment 13 WebKit Commit Bot 2019-10-04 11:52:29 PDT
Comment on attachment 380225 [details]
Patch

Rejecting attachment 380225 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 380225, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 5000 characters of output:
Core/Modules/streams/ReadableStreamSource.cpp
patching file Source/WebCore/Modules/streams/ReadableStreamSource.h
patching file Source/WebCore/Modules/webaudio/AudioContext.h
patching file Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.cpp
patching file Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.h
patching file Source/WebCore/Modules/webauthn/PublicKeyCredential.h
patching file Source/WebCore/Modules/webgpu/WebGPU.cpp
patching file Source/WebCore/Modules/webgpu/WebGPU.h
patching file Source/WebCore/Modules/webgpu/WebGPUAdapter.cpp
patching file Source/WebCore/Modules/webgpu/WebGPUAdapter.h
patching file Source/WebCore/Modules/webgpu/WebGPUBuffer.cpp
patching file Source/WebCore/Modules/webgpu/WebGPUBuffer.h
patching file Source/WebCore/Modules/webgpu/WebGPUDevice.cpp
patching file Source/WebCore/Modules/webgpu/WebGPUDevice.h
patching file Source/WebCore/Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp
patching file Source/WebCore/Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.cpp
patching file Source/WebCore/Modules/webvr/NavigatorWebVR.cpp
patching file Source/WebCore/Modules/webvr/NavigatorWebVR.h
patching file Source/WebCore/Modules/webvr/VRDisplay.cpp
patching file Source/WebCore/Modules/webvr/VRDisplay.h
patching file Source/WebCore/WebCore.xcodeproj/project.pbxproj
patching file Source/WebCore/animation/KeyframeEffect.cpp
patching file Source/WebCore/animation/WebAnimation.cpp
patching file Source/WebCore/animation/WebAnimation.h
patching file Source/WebCore/bindings/js/CachedModuleScriptLoader.cpp
patching file Source/WebCore/bindings/js/CachedModuleScriptLoaderClient.h
patching file Source/WebCore/bindings/js/JSDOMPromiseDeferred.h
patching file Source/WebCore/bindings/js/JSHTMLTemplateElementCustom.cpp
patching file Source/WebCore/bindings/js/JSImageDataCustom.cpp
patching file Source/WebCore/bindings/js/JSMessageEventCustom.cpp
patching file Source/WebCore/bindings/js/JSReadableStreamSourceCustom.cpp
patching file Source/WebCore/bindings/js/JSWebAnimationCustom.cpp
patching file Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp
patching file Source/WebCore/bindings/js/JSWorkerGlobalScopeCustom.cpp
patching file Source/WebCore/bindings/js/JSWorkletGlobalScopeBase.cpp
patching file Source/WebCore/bindings/js/ScriptModuleLoader.cpp
patching file Source/WebCore/css/FontFace.cpp
patching file Source/WebCore/css/FontFace.h
patching file Source/WebCore/css/FontFaceSet.cpp
Hunk #2 FAILED at 57.
Hunk #3 FAILED at 68.
Hunk #6 FAILED at 205.
Hunk #7 succeeded at 238 (offset 2 lines).
3 out of 7 hunks FAILED -- saving rejects to file Source/WebCore/css/FontFaceSet.cpp.rej
patching file Source/WebCore/css/FontFaceSet.h
patching file Source/WebCore/dom/CustomElementRegistry.cpp
patching file Source/WebCore/dom/DeviceOrientationOrMotionEvent.cpp
patching file Source/WebCore/dom/DeviceOrientationOrMotionEvent.h
patching file Source/WebCore/dom/MouseEvent.cpp
patching file Source/WebCore/dom/MouseEvent.h
patching file Source/WebCore/html/CustomPaintCanvas.h
patching file Source/WebCore/html/ImageBitmap.cpp
patching file Source/WebCore/html/ImageBitmap.h
patching file Source/WebCore/html/OffscreenCanvas.cpp
patching file Source/WebCore/html/OffscreenCanvas.h
patching file Source/WebCore/loader/ImageLoader.cpp
patching file Source/WebCore/loader/ImageLoader.h
patching file Source/WebCore/page/DOMWindow.cpp
patching file Source/WebCore/page/Navigator.h
patching file Source/WebCore/page/PageConsoleClient.cpp
patching file Source/WebCore/platform/graphics/CustomPaintImage.cpp
patching file Source/WebCore/testing/Internals.cpp
patching file Source/WebCore/testing/Internals.h
patching file Source/WebCore/testing/ServiceWorkerInternals.h
patching file Source/WebCore/testing/ServiceWorkerInternals.mm
patching file Source/WebCore/workers/service/ServiceWorkerContainer.cpp
patching file Source/WebCore/workers/service/ServiceWorkerContainer.h
patching file Source/WebCore/workers/service/ServiceWorkerJob.cpp
patching file Source/WebCore/workers/service/ServiceWorkerJob.h
patching file Source/WebCore/workers/service/ServiceWorkerRegistration.cpp
patching file Source/WebCore/workers/service/ServiceWorkerRegistration.h
patching file Source/WebCore/worklets/PaintWorkletGlobalScope.cpp

Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit
Updating OpenSource
From https://git.webkit.org/git/WebKit
   d2143ddc96d..08eac19a9b4  master     -> origin/master
Partial-rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc ...
Currently at 250730 = d2143ddc96d93f04c5a6b5339230ee3efa2ea346
r250731 = fd553cf3ddb252f284857f8bd823c7a5af65a17f
r250732 = 08eac19a9b4b4c7413a76bf93bcafe5a847a9008
Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc
First, rewinding head to replay your work on top of it...
Fast-forwarded master to refs/remotes/origin/master.

Full output: https://webkit-queues.webkit.org/results/13095896
Comment 14 Tim Horton 2019-10-04 12:29:01 PDT
https://trac.webkit.org/changeset/250735/webkit
Comment 15 Radar WebKit Bug Importer 2019-10-04 12:29:20 PDT
<rdar://problem/55991406>
Comment 16 Konstantin Tokarev 2019-10-04 12:45:43 PDT
>They're (header) optimizations guided by profiling (the build)!

What methodology are you using to identify which includes have the biggest impact?
Comment 17 Tim Horton 2019-10-04 13:01:40 PDT
(In reply to Konstantin Tokarev from comment #16)
> >They're (header) optimizations guided by profiling (the build)!
> 
> What methodology are you using to identify which includes have the biggest
> impact?

-ftime-trace