Skip to content

Don't block script task while fetching external scripts #4088

Closed

Description

@mbrubeck

When fetching the source for a <script> element, HTMLScriptElementHelpers::prepare calls load_whole_resource, which blocks the script task until the resource is fully loaded. Instead we should fetch asynchronously, so the script event loop can spin while the network task fetches the script.

See also step 15 of the prepare a script algorithm.

Activity

  1. added
    I-perf-slow
    A-content/script
    on Nov 24, 2014
  2. jdm commented on Nov 24, 2014

    @jdm
    Member

    This (and similar async networking changes such as parsing) will require #4057.

  3. nox commented on Sep 30, 2017

    @nox
    Contributor

    This hasn't been true for a long time, AFAIK.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-content/scriptI-perf-slow

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions