Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Run importScripts() fetching steps in parallel #3827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

domenic
Copy link
Member

@domenic domenic commented Jul 16, 2018

Fixes #3775.

As noted there in more detail, this doesn't change much of the
semantics. Execution order is still synchronous, and errors are still
thrown in the same deterministic fashion for both network failures and
script-running failures. Indeed, Gecko already implements these
semantics.

It's likely that at the time this specification was originally written,
whether these fetches were in parallel or sequential was not observable,
at least by client-side code. However, these days, with the web
performance APIs and with service workers, it's very observable, and we
should be sure that parallel fetching is allowed.

For reference, here is a 2015-08-27 snapshot of this method, before any
of the script-loading refactorings and changes due to module scripts:

https://html.spec.whatwg.org/commit-snapshots/c9e804f04d03a0658bfa689cb0f368a4d2e37936/#dom-workerglobalscope-importscripts

You can see that it was sequential even then.


@nilpatelmicrosoft, @wanderview, and @nhiroki, would you be able to help with web platform tests for this? I'm not sure what kind of tests to write, though, since it still seems like implementing sequential fetching would be a valid implementation of this new spec... Thoughts apprecaited.


💥 Error: Wattsi server error 💥

PR Preview failed to build. (Last tried on Jan 15, 2021, 7:58 AM UTC).

More

PR Preview relies on a number of web services to run. There seems to be an issue with the following one:

🚨 Wattsi Server - Wattsi Server is the web service used to build the WHATWG HTML spec.

🔗 Related URL

Command failed: /home/noderunner/wattsi/bin/wattsi /tmp/upload_f6b17340d7cb3186a5046869534c661c (sha not provided) 2ppvss517rs default /tmp/upload_f44c6a082672092c46390504ddf80c93

If you don't have enough information above to solve the error by yourself (or to understand to which web service the error is related to, if any), please file an issue.

Fixes #3775.

As noted there in more detail, this doesn't change much of the
semantics. Execution order is still synchronous, and errors are still
thrown in the same deterministic fashion for both network failures and
script-running failures. Indeed, Gecko already implements these
semantics.

It's likely that at the time this specification was originally written,
whether these fetches were in parallel or sequential was not observable,
at least by client-side code. However, these days, with the web
performance APIs and with service workers, it's very observable, and we
should be sure that parallel fetching is allowed.

For reference, here is a 2015-08-27 snapshot of this method, before any
of the script-loading refactorings and changes due to module scripts:

https://html.spec.whatwg.org/commit-snapshots/c9e804f04d03a0658bfa689cb0f368a4d2e37936/#dom-workerglobalscope-importscripts

You can see that it was sequential even then.
Base automatically changed from master to main January 15, 2021 07:57
@annevk
Copy link
Member

annevk commented Jul 29, 2021

Do you want to rebase this? Happy to review.

@domenic
Copy link
Member Author

domenic commented Jul 29, 2021

I got discouraged since nobody seems up for writing web platform tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

importScripts should be able to fetch in parallel and execute synchronously
2 participants