Skip to content

ext/url: start implementing URLPatternList #20899

@lucab

Description

@lucab

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    ext/urlrelated to ext/urlfeatnew feature (which has been agreed to/accepted)important for fresh

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions