url: spec-compliant URLSearchParams serializer#11626
url: spec-compliant URLSearchParams serializer#11626TimothyGu wants to merge 2 commits intonodejs:masterfrom
Conversation
|
Awesome! Will take a look at it in detail tomorrow |
lib/internal/url.js
Outdated
There was a problem hiding this comment.
nit: len === 0 to avoid conversion to boolean
lib/internal/url.js
Outdated
There was a problem hiding this comment.
nit: use len also here or do not create it earlier
There was a problem hiding this comment.
can you update the Refs SHA? This fix was in e94c604
joyeecheung
left a comment
There was a problem hiding this comment.
Great work! Feel good to see the tests get uncommented =)
lib/internal/url.js
Outdated
There was a problem hiding this comment.
nit: Maybe noEscapeTable? The name noEscapeParam together with the function name escapeParam looks a bit weird..
There was a problem hiding this comment.
Yeah... I agree. Used the more standard noEscape instead.
lib/internal/url.js
Outdated
There was a problem hiding this comment.
Another way would be to fork the hexTable too with hexTable[0x20] = '+'..not sure how much that would gain though.
There was a problem hiding this comment.
Nice, that does bring some speedup (consistently 1-2% for altspace benchmark).
805fbcf to
b05e5de
Compare
|
@targos, @joyeecheung, PR updated to address comments. |
|
Still LGTM |
|
@jasnell PTAL... |
jasnell
left a comment
There was a problem hiding this comment.
My apologies on the late review.. been a bit distracted. This LGTM so long as CI is green :-)
b05e5de to
059e1fb
Compare
|
CI is actually passing. Landed in d77a758. Thanks all. |
PR-URL: nodejs#11626 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
|
@TimothyGu this is not landing in Question: do you have a list of all the URL commits that need backport? |
PR-URL: nodejs#11626 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Differences with
querystringmodule (which the serializer currently depends on):querystring%20+''%27((%28))%29~~%7EA C++ implementation cannot seem to reach the JS version's performance.
Benchmark: before vs. after
Benchmark: legacy (
querystring) vs. WHATWGChecklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
url