Conversation
lib/internal/url.js
Outdated
lib/querystring.js
Outdated
There was a problem hiding this comment.
Did you benchmark this change?
starkwang
left a comment
There was a problem hiding this comment.
This change might have some negative effects on performance. Could you run a benchmark for this ?
lib/internal/url.js
Outdated
There was a problem hiding this comment.
Unexpected trailing comma. Remember to run lint before commit: make lint
There was a problem hiding this comment.
@starkwang I did it. And everything was ok:
There was a problem hiding this comment.
@starkwang we had this rule for trailing comma
'comma-dangle': ['error', 'only-multiline']
It allows using trailing comma. But maybe we should fix this rule. What do you think?
There was a problem hiding this comment.
Oh sorry, I misunderstood the meaning of 'only-multiline'. Just ignore it.
lib/url.js
Outdated
There was a problem hiding this comment.
Trailing commas are fine and if we didn't have so much code that lacked them, we would probably even have a lint rule to enforce them. Anything that cleans up git diffs in the long-term is a positive.
|
@mscdex @starkwang I'm running benchmarks now, so I'll attach the results as soon as possible |
apapirovski
left a comment
There was a problem hiding this comment.
Code seems fine but this should have benchmark results.
lib/url.js
Outdated
There was a problem hiding this comment.
Trailing commas are fine and if we didn't have so much code that lacked them, we would probably even have a lint rule to enforce them. Anything that cleans up git diffs in the long-term is a positive.
lib/querystring.js
Outdated
There was a problem hiding this comment.
Can you predeclare the error type somewhere at the top scope? There's no need to create this object on the run each time.
|
@mscdex @starkwang you were right about "querystring" module. There is performance reduction in this change: I'll revert changes for "querystring" and run benchmarks for "url" |
d6f2dd1 to
43b60af
Compare
|
I reverted changes for "querystring" module and ran benchmarks for "url" module only. Results: Looks like these changes make the code a little bit slower, what do you think about it? |
|
@daynin Do you have an opinion on whether this PR should land, given your benchmark results? If yes, this could land as it is, I think. |
|
@addaleax yeah, I think it should land if nobody has any objections |
PR-URL: #19076 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: #19076 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: #19076 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: #19076 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
url, querystring, internal/url, internal/querystring