forked from whatwg/html
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Editorial: decrease traversals for module graph fetching
Previously, we could invoke the internal module script graph fetching procedure once for each combination of node and ancestor list, i.e. once for each node and for each path to the node. This could be up to O(2^n) for n nodes, as seen in https://gist.github.com/domenic/d877f8b2e6d6ae62a9c94f916739e4db. This change simplifies the model by using a single visited set per top-level fetch, which ensures that the internal module script graph fetching procedure is only invoked once for each node. This change is technically editorial, as it has no visible, testable effects. (It may subtly change the choice of error reported, but that was already nondeterministic, and being fixed in whatwg#2991.) It's intended to make it much easier for implementers to follow the standard as written without causing themselves massive slowdowns.
- Loading branch information
Showing
1 changed file
with
31 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters