Skip to content
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

ext/url: start implementing URLPatternList #20899

Open
lucab opened this issue Oct 13, 2023 · 0 comments
Open

ext/url: start implementing URLPatternList #20899

lucab opened this issue Oct 13, 2023 · 0 comments
Labels
ext/url related to ext/url feat new feature (which has been agreed to/accepted) important for fresh

Comments

@lucab
Copy link
Contributor

lucab commented Oct 13, 2023

This is a request to follow along whatwg/urlpattern#166 and start drafting an experimental implementation of URLPatternList.

The topic of an optimized URLPatternList surfaced again, triggered by URLPattern performance issues at #19861 recently observed in the wild.

As a real world usecase, it was found out that Fresh currently performs a series of URLPattern.exec(url) on every request (see denoland/fresh#1931 for more details).
Each time, the url argument is the same constant string which has to go through a set of URL patterns to match against, with overall performance costs which are linear in the cardinality of the set of URL patterns.
It looks like this is the exact case for optimization that URLPatternList is aiming at.

For reference, there were these previous attempts to start wiring this in Deno in the past:

@lucacasonato lucacasonato added feat new feature (which has been agreed to/accepted) and removed enhancement labels Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ext/url related to ext/url feat new feature (which has been agreed to/accepted) important for fresh
Projects
None yet
Development

No branches or pull requests

2 participants