-
Notifications
You must be signed in to change notification settings - Fork 339
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 encode path segments in longer string slices #1026
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1026 +/- ##
=======================================
Coverage ? 79.93%
=======================================
Files ? 24
Lines ? 4322
Branches ? 0
=======================================
Hits ? 3455
Misses ? 867
Partials ? 0 ☔ View full report in Codecov by Sentry. |
url/src/parser.rs
Outdated
@@ -1305,7 +1367,7 @@ impl<'a> Parser<'a> { | |||
} | |||
} | |||
if scheme_type.is_file() { | |||
// while url’s path’s size is greater than 1 | |||
// while url's path’s size is greater than 1 | |||
// and url’s path[0] is the empty string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed a `
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. I missed reverting that after I noticed that kind of quote is used everywhere in the codebase (habit I have because in Deno, we avoid using non-ascii characters in JS because it causes the source code to be stored less efficiently. Example: microsoft/TypeScript#53608). Thanks!
It fully occurred to me how annoying it must be to get a "you missed a smudge" review from a rando on your genuinely very impressive work so I want to redeem myself: You're awesome URL parsing has been a bit of a bottleneck in my current main project for a while and all your work does a pretty good dent in it Seeing all your pull requests was a very nice thing to wake up and look forward to |
Signed-off-by: David Sherret <[email protected]>
Not annoying. Thanks! |
Before:
After: