WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
223727
run-minibrowser is slow
https://bugs.webkit.org/show_bug.cgi?id=223727
Summary
run-minibrowser is slow
Cameron McCormack (:heycam)
Reported
2021-03-24 20:27:55 PDT
On my machine, run-minibrowser takes 2s to do its preparatory work before the MiniBrowser binary is launched. (I measured this just with `time run-minibrowser --help`.)
Attachments
Patch
(9.49 KB, patch)
2021-03-24 20:35 PDT
,
Cameron McCormack (:heycam)
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(9.36 KB, patch)
2021-03-24 20:37 PDT
,
Cameron McCormack (:heycam)
no flags
Details
Formatted Diff
Diff
Patch
(9.40 KB, patch)
2021-03-24 21:49 PDT
,
Cameron McCormack (:heycam)
no flags
Details
Formatted Diff
Diff
Patch
(9.54 KB, patch)
2021-03-29 16:27 PDT
,
Cameron McCormack (:heycam)
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Cameron McCormack (:heycam)
Comment 1
2021-03-24 20:35:26 PDT
Created
attachment 424213
[details]
Patch
Cameron McCormack (:heycam)
Comment 2
2021-03-24 20:37:49 PDT
Created
attachment 424214
[details]
Patch
Cameron McCormack (:heycam)
Comment 3
2021-03-24 20:43:47 PDT
Comment on
attachment 424214
[details]
Patch Something went wrong for non macOS builds.
Cameron McCormack (:heycam)
Comment 4
2021-03-24 21:49:22 PDT
Created
attachment 424217
[details]
Patch
Sam Weinig
Comment 5
2021-03-25 13:09:47 PDT
Comment on
attachment 424217
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=424217&action=review
> Tools/ChangeLog:19 > + run-minibrowser needs to know what port it's running on, since that > + affects the build directory to look in to find the MiniBrowser binary. > + On macOS, webkitdirs.pm's determinePortName ends up running > + `xcodebuild -showsdks` to see if the current SDK has an internal > + variant available, but this is slow. But we don't need to know the > + exact SDK name here, just the SDK platform name, to determine the > + port name. > + > + So we shuffle some code around to avoid calling `xcodebuild -showsdks` > + where we can. This reduces the time spent in run-minibrowser before > + MiniBrowser is launched (crudely measured with `time run-minibrowser > + --help`) from 2s to 0.6s on this machine.
Very nice! Can we avoid ever calling `xcodebuild -showsdks`, and just call `xcrun --show-sdk-path` for current SDK determination instead? That should be really fast.
Sam Weinig
Comment 6
2021-03-25 13:13:41 PDT
(In reply to Sam Weinig from
comment #5
)
> Comment on
attachment 424217
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=424217&action=review
> > > Tools/ChangeLog:19 > > + run-minibrowser needs to know what port it's running on, since that > > + affects the build directory to look in to find the MiniBrowser binary. > > + On macOS, webkitdirs.pm's determinePortName ends up running > > + `xcodebuild -showsdks` to see if the current SDK has an internal > > + variant available, but this is slow. But we don't need to know the > > + exact SDK name here, just the SDK platform name, to determine the > > + port name. > > + > > + So we shuffle some code around to avoid calling `xcodebuild -showsdks` > > + where we can. This reduces the time spent in run-minibrowser before > > + MiniBrowser is launched (crudely measured with `time run-minibrowser > > + --help`) from 2s to 0.6s on this machine. > > Very nice! > > Can we avoid ever calling `xcodebuild -showsdks`, and just call `xcrun > --show-sdk-path` for current SDK determination instead? That should be > really fast.
Actually, ignore this, I see it want's to figure out if an internal SDK installed, and that won't do it on its own.
Cameron McCormack (:heycam)
Comment 7
2021-03-25 13:57:43 PDT
I have a feeling we can do our own grovelling around the currently selected Xcode's directories to find the SDKs ourselves. That at least contains all the SDKs on my system that show up in `xcodebuild -showsdks`. But I'm not confident there aren't other locations that might be searched too.
EWS
Comment 8
2021-03-25 23:57:41 PDT
Committed
r275081
: <
https://commits.webkit.org/r275081
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 424217
[details]
.
Radar WebKit Bug Importer
Comment 9
2021-03-25 23:58:48 PDT
<
rdar://problem/75874999
>
Jonathan Bedard
Comment 10
2021-03-26 11:11:51 PDT
Reverted
r275081
for reason: Broke Apple Internal builds Committed
r275105
(
235813@main
): <
https://commits.webkit.org/235813@main
>
Cameron McCormack (:heycam)
Comment 11
2021-03-29 16:27:21 PDT
Created
attachment 424600
[details]
Patch
EWS
Comment 12
2021-03-29 19:42:42 PDT
Committed
r275196
: <
https://commits.webkit.org/r275196
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 424600
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug