You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
π It seems that workerd suffers from the same performance issue that I fixed in Node.js (nodejs/node#51520), where repeat writes to URL.searchParams trigger URL to re-parse the params on every write, leading to a performance bottleneck.
A request to /url will time out, but a request to /urlsearchparams runs without issue.
I suspect a patch similar to what I landed in Node.js, where URL is lazily updated if searchParams has changed the next time a getter is called, rather than immediately updating URL when searchParams changes, would fix it.
Alas, I'm not confident enough w/ C++ and this codebase to submit a patch myself I suspect -- perhaps if someone can point me in the direction of where URLSearchParams talks back to URL, I might be able to figure it out from there?
The text was updated successfully, but these errors were encountered:
π It seems that workerd suffers from the same performance issue that I fixed in Node.js (nodejs/node#51520), where repeat writes to
URL.searchParams
triggerURL
to re-parse the params on every write, leading to a performance bottleneck.This can be seen in the Workers playground:
A request to
/url
will time out, but a request to/urlsearchparams
runs without issue.I suspect a patch similar to what I landed in Node.js, where URL is lazily updated if searchParams has changed the next time a getter is called, rather than immediately updating URL when searchParams changes, would fix it.
Alas, I'm not confident enough w/ C++ and this codebase to submit a patch myself I suspect -- perhaps if someone can point me in the direction of where URLSearchParams talks back to URL, I might be able to figure it out from there?
The text was updated successfully, but these errors were encountered: