I just tried to match a URL against about a hundred patterns of various types (thanks to Claude code), expecting it to be a non-issue.
A hundred regex tests, for example, is generally very fast. A quick Python script made them run in 0.85ms. A hundred Flask router tests is 2.64ms.
So I had no reason to think this API would be slow. Surely matching a URL is a subset of generalized regexes and can only be fast? And given that routing is not an activity you do a lot, why would it matter anyway?
But the performances were atrocious: it took 8 seconds to resolve the worst-case scenario on Firefox, and it locked the entire browser UI.
Ok, note to self, stay away from the URL Pattern API.
...Eight seconds for a hundred matches? What does your code look like?