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

perf(url): return early if url has no query string #15856

Merged
merged 1 commit into from Sep 11, 2022

Conversation

billywhizz
Copy link
Contributor

This small change returns early if the url being parsed has no query string. This gives a nice performance improvement when tested on Ubuntu 22.04 docker in unprivileged mode:

Screenshot from 2022-09-10 23-50-54

I ran wpt tests as follows and all are passing.

deno run -A --unstable ./tools/wpt.ts setup
deno run -A --unstable ./tools/wpt.ts run -- url
deno run -A --unstable ./tools/wpt.ts run --

I can't bench right now on Mac or Windows so if anyone can verify they can see same thing there, that would be great.

this is my first Deno PR so let me know if i have missed something out.

@billywhizz billywhizz added perf performance related ext/url related to ext/url labels Sep 10, 2022
@CLAassistant
Copy link

CLAassistant commented Sep 10, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@littledivy littledivy merged commit 6d8f6d5 into denoland:main Sep 11, 2022
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 perf performance related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants