Skip to content

Configurable resource prefetching #70

Merged
camillobruni merged 16 commits into
WebKit:mainfrom
camillobruni:2025-04-23_prefetch_option
Aug 6, 2025
Merged

Configurable resource prefetching #70
camillobruni merged 16 commits into
WebKit:mainfrom
camillobruni:2025-04-23_prefetch_option

Conversation

@camillobruni
Copy link
Copy Markdown
Contributor

@camillobruni camillobruni commented Apr 23, 2025

This addresses issue #58 and is useful for local profiling.

If the prefetchResources is disabled, we now no longer preload them eagerly, but rather use the live URL and either script-inject it or use it directly with workers.
This means we can easily get the original source positions for profiling.

  • --no-prefetch command ilne support
  • &prefetchResources=0 URLParam support
  • Improve test coverage and add --no-prefetch tests
  • Check that test shell output for failures to catch JSC errors (it does not report exit != 0 on rejected promises)

Drive-by-fix:

  • Move FileLoader out of the IIFE
  • Check that JetStreamDriver has at least one active benchmark
  • Add assertions for valid scores
  • Fix benchmarks selection with tags

--no-prefetch will directly use `load(...)` instead of
just injecting the script sources which makes it easier to navigate
and investigate profiles.

- Support more complex command line args and flags
- Add --help to cli.js

Bug: 411303884
Change-Id: I43a032342a6da42bfb61ebd9415e62f9d9597ecc
Reviewed-on: https://chromium-review.googlesource.com/c/external/github.com/WebKit/JetStream/+/6468518
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 23, 2025

Deploy Preview for webkit-jetstream-preview ready!

Name Link
🔨 Latest commit c4e714a
🔍 Latest deploy log https://app.netlify.com/projects/webkit-jetstream-preview/deploys/68933695f1298e0007fe2201
😎 Deploy Preview https://deploy-preview-70--webkit-jetstream-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@camillobruni camillobruni changed the title 2025 04 23 prefetch option Make resource prefetching optional Apr 23, 2025
@camillobruni camillobruni changed the title Make resource prefetching optional Configurable resource prefetching Apr 23, 2025
Copy link
Copy Markdown
Contributor

@kmiller68 kmiller68 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall seems fine. A couple comments though.

Comment thread cli.js Outdated
Comment thread JetStreamDriver.js Outdated
Comment thread cli.js Outdated
Comment thread index.html Outdated
Comment thread JetStreamDriver.js Outdated
@camillobruni camillobruni requested review from danleh and kmiller68 July 31, 2025 12:39
Comment thread cli.js Outdated
Comment thread JetStreamDriver.js
Comment thread tests/run.mjs Outdated
Comment thread tests/run.mjs
Comment thread JetStreamDriver.js
Comment thread JetStreamDriver.js
@camillobruni camillobruni merged commit 2d98269 into WebKit:main Aug 6, 2025
10 checks passed
@camillobruni camillobruni deleted the 2025-04-23_prefetch_option branch August 6, 2025 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants