| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Review requested:
|
Sorry, something went wrong.
Codecov Report❌ Patch coverage is 97.08738% with 3 lines in your changes missing coverage. Please review.
@@ Coverage Diff @@
## main #65361 +/- ##
==========================================
- Coverage 91.85% 90.11% -1.74%
==========================================
Files 400 752 +352
Lines 178855 252356 +73501
Branches 27319 47474 +20155
==========================================
+ Hits 164283 227413 +63130
- Misses 14243 16224 +1981
- Partials 329 8719 +8390
... and 490 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was a problem hiding this comment.
AI agents are not permitted to Signed-off-by
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
|
Removed the Signed-off-by trailer from the commit(s). An AI agent cannot attest the DCO. |
Sorry, something went wrong.
Parse one-byte ASCII inputs in place instead of copying them into a UTF-8 buffer, and reuse the original V8 string when the serialized href is unchanged. Delay URLContext allocation until parse finishes and skip ToString when the input is already a string. Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com> Assisted-by: Cursor
There was a problem hiding this comment.
I think we can avoid always comparing the strings here?
Base parsing and setters discard reuse_input, so here we can avoid an O(n) comparison no?
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM, I think we can seperate PR same improvement for canParse?
Sorry, something went wrong.
Callers that never reuse the original V8 string (base URL parse and setters) now omit reuse_input so ParseUrlFromV8String does not compare href against the input. Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com> Assisted-by: Cursor
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
Lgtm
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Parse one-byte ASCII inputs in place instead of copying them into a UTF-8 buffer, and reuse the original V8 string when the serialized href is unchanged. Delay URLContext allocation until parse finishes and skip ToString when the input is already a string. Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com> Assisted-by: Cursor PR-URL: #65361 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Callers that never reuse the original V8 string (base URL parse and setters) now omit reuse_input so ParseUrlFromV8String does not compare href against the input. Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com> Assisted-by: Cursor PR-URL: #65361 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Parse one-byte ASCII inputs in place instead of copying them into a UTF-8 buffer, and reuse the original V8 string when the serialized href is unchanged. Delay URLContext allocation until parse finishes and skip ToString when the input is already a string. Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com> Assisted-by: Cursor PR-URL: #65361 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Callers that never reuse the original V8 string (base URL parse and setters) now omit reuse_input so ParseUrlFromV8String does not compare href against the input. Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com> Assisted-by: Cursor PR-URL: #65361 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Parse one-byte ASCII inputs in place instead of copying them into a UTF-8 buffer, and reuse the original V8 string when the serialized href is unchanged. Delay URLContext allocation until parse finishes and skip ToString when the input is already a string. Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com> Assisted-by: Cursor PR-URL: #65361 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Callers that never reuse the original V8 string (base URL parse and setters) now omit reuse_input so ParseUrlFromV8String does not compare href against the input. Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com> Assisted-by: Cursor PR-URL: #65361 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
| Back | FazBrowse Home | New Git URL |
Speeds up new URL() / URL.parse() on the common path: already-serialized ASCII hrefs.
The binding currently always:
Typical URLs (https://example.com/path, the whatwg-url-parse benchmark corpus) are one-byte ASCII and already in serialized form. This change:
Non-ASCII inputs still go through Utf8Value. Those results are never reused as the original string, because UTF-8 conversion may replace unpaired surrogates.
Benchmark
Same machine, Release build, benchmark/url/whatwg-url-parse.js e=12. Repeated runs:
dot (needs path normalization, so a new href string) is unchanged.
Review follow-up
Tests
Assisted-by: Cursor