-
Notifications
You must be signed in to change notification settings - Fork 7
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
Investigate slow new URL
#33
Comments
My local benchmark result for
|
Maybe @cjihrig or @bnoordhuis could offer some information/advice on how to approach this. |
Deno uses a smart way of just returning the start and end points for the states from native side: https://github.com/denoland/deno/blob/0d4e4af7acf82c1365999a7281910daa05f0e982/ext/url/lib.rs#L100 |
Doesn't this just require someone to do some performance work on Node's URL implementation? I can't speak to Bun at all, but Deno has people that spend all (or most) of their time improving performance of things like this. |
Yeah, the implementation was written to be spec compliant, not performant. Just needs some attention from folks who want to work on the performance tuning. |
We can maybe start from not regressing:
I'd also suggest that we need to be careful about micro-benchmarking the URL constructor using a constant input (e.g. our type=wpt benchmarks go to some lengths to make sure that the result is meaningful, and the input comes from the WPT test data set). There are a lot of factors that can affect the numbers (e.g. if you don't even use the returned result v8 might just fold things and you'd be comparing between noops and actually doing anything). So sheer numbers are not very meaningful when it's not clear if the benchmarks are written in the same and a proper way. |
I'm working on this, and writing a new URL parser (available but work-in-progress at https://github.com/ada-url/ada) |
ADA is neat ^^ |
A quick update referencing the benchmark that leads to this issue. For parsing the URL
|
Progress update on Ada: Right now,
|
Very happy to see this! The performance of |
It is come to my attention that recent benchmarks run from folks at deno show that
new URL
invocation is super slow in node. Referencing: https://twitter.com/deno_land/status/1598394826588028928?s=61&t=qr5eBcWZkP3rwIdIefHWdAThe text was updated successfully, but these errors were encountered: