GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — querystring: speed up default parse and unescape by anonrig · Pull Request #66175 · nodejs/node

Conversation

@anonrig

@anonrig anonrig commented Sep 21, 2026

Copy link
Copy Markdown
Member

Skip the %XX walk in unescapeBuffer when the input has no %, and add a dedicated '&'/'=' scanner for the default querystring.parse() path so it does not build separator code arrays or run the multi-character state machine.

Custom separators, maxKeys, decodeURIComponent, and a replaced querystring.unescape still use the existing parser.

This change was implemented with assistance from a closed-source coding agent. I verified the source, official benchmark/querystring results, and test-querystring.js.

Official benches

Three-run medians, n=1e6:

bench main this PR delta
querystring-parse.js encodemany 1.49M 2.05M +38%
querystring-parse.js manyblankpairs 14.8M 17.3M +17%
querystring-parse.js encodelast 2.91M 3.20M +10%
querystring-parse.js noencode 3.86M 4.16M +8%
querystring-unescapebuffer.js (no escapes) 9.73M 13.21M +36%

Tests

test-querystring.js and the other test-querystring-*.js files.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss and gunjam reacted with rocket emoji
All reactions
  • 🚀 2 reactions
@anonrig
querystring: speed up default parse and unescape
824e166
Skip the %XX walk in unescapeBuffer when the input has no '%'.
Add a dedicated '&'/'=' scanner for the default parse path so
it does not build separator code arrays or run the multi-char
state machine.

Official benchmark/querystring/querystring-parse.js:
encodemany is about 38% faster, manyblankpairs about 17%,
encodelast about 10%, noencode about 8%.
Official querystring-unescapebuffer.js with no escapes is
about 36% faster.

Assisted-by: a closed-source coding agent
Signed-off-by: Yagiz Nizipli <[email protected]>
Co-authored-by: Yagiz Nizipli <[email protected]>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. querystring Issues and PRs related to the built-in querystring module. labels Sep 21, 2026
jasnell
jasnell approved these changes Sep 21, 2026
View reviewed changes
@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 21, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 21, 2026
@nodejs-github-bot

nodejs-github-bot commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/77719/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@codecov

codecov Bot commented Sep 21, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.30%. Comparing base (dd5dfb5) to head (824e166).
⚠️ Report is 184 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66175      +/-   ##
==========================================
+ Coverage   90.27%   90.30%   +0.03%     
==========================================
  Files         790      790              
  Lines      271651   272173     +522     
  Branches    51842    51978     +136     
==========================================
+ Hits       245228   245785     +557     
+ Misses      16928    16885      -43     
- Partials     9495     9503       +8     
Files with missing lines Coverage Δ
lib/querystring.js 100.00% <100.00%> (ø)

... and 59 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/77759/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gurgunday
gurgunday approved these changes Sep 22, 2026
View reviewed changes

@gurgunday gurgunday left a comment

Copy link
Copy Markdown
Member

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.

lgtm

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@panva panva added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. labels Sep 26, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 6a6e09e into nodejs:main Sep 26, 2026
97 of 98 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Sep 26, 2026

Copy link
Copy Markdown
Collaborator

Landed in 6a6e09e

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 26, 2026
aduh95 pushed a commit that referenced this pull request Sep 27, 2026
@anonrig @aduh95
querystring: speed up default parse and unescape
6966fbd
Skip the %XX walk in unescapeBuffer when the input has no '%'.
Add a dedicated '&'/'=' scanner for the default parse path so
it does not build separator code arrays or run the multi-char
state machine.

Official benchmark/querystring/querystring-parse.js:
encodemany is about 38% faster, manyblankpairs about 17%,
encodelast about 10%, noencode about 8%.
Official querystring-unescapebuffer.js with no escapes is
about 36% faster.

Assisted-by: a closed-source coding agent
Signed-off-by: Yagiz Nizipli <[email protected]>
Co-authored-by: Yagiz Nizipli <[email protected]>
PR-URL: #66175
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
HoonDongKang pushed a commit to HoonDongKang/node that referenced this pull request Sep 28, 2026
@anonrig @HoonDongKang
querystring: speed up default parse and unescape
bdb561b
Skip the %XX walk in unescapeBuffer when the input has no '%'.
Add a dedicated '&'/'=' scanner for the default parse path so
it does not build separator code arrays or run the multi-char
state machine.

Official benchmark/querystring/querystring-parse.js:
encodemany is about 38% faster, manyblankpairs about 17%,
encodelast about 10%, noencode about 8%.
Official querystring-unescapebuffer.js with no escapes is
about 36% faster.

Assisted-by: a closed-source coding agent
Signed-off-by: Yagiz Nizipli <[email protected]>
Co-authored-by: Yagiz Nizipli <[email protected]>
PR-URL: nodejs#66175
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
aduh95 pushed a commit that referenced this pull request Sep 28, 2026
@anonrig @aduh95
querystring: speed up default parse and unescape
0965b28
Skip the %XX walk in unescapeBuffer when the input has no '%'.
Add a dedicated '&'/'=' scanner for the default parse path so
it does not build separator code arrays or run the multi-char
state machine.

Official benchmark/querystring/querystring-parse.js:
encodemany is about 38% faster, manyblankpairs about 17%,
encodelast about 10%, noencode about 8%.
Official querystring-unescapebuffer.js with no escapes is
about 36% faster.

Assisted-by: a closed-source coding agent
Signed-off-by: Yagiz Nizipli <[email protected]>
Co-authored-by: Yagiz Nizipli <[email protected]>
PR-URL: #66175
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
@github-actions github-actions Bot mentioned this pull request Oct 5, 2026
2026-10-07, Version 26.11.0 (Current) #66546
Merged
@vedchaudhari vedchaudhari mentioned this pull request Oct 6, 2026
querystring: fix value decoding after encoded keys #66553
Merged
nodejs-github-bot pushed a commit that referenced this pull request Oct 13, 2026
@vedchaudhari
querystring: fix value decoding after encoded keys
8cf60c5
In the non-default parse() path, a key with more than one percent
escape could corrupt non-ASCII characters in its value.

Keep key characters out of the value's encoding check.

Assisted-by: claude:opus-5.5
Signed-off-by: vedchaudhari <[email protected]>
PR-URL: #66553
Refs: #66175
Reviewed-By: Yagiz Nizipli <[email protected]>
richardlau pushed a commit that referenced this pull request Oct 13, 2026
@vedchaudhari @richardlau
querystring: fix value decoding after encoded keys
dd4715a
In the non-default parse() path, a key with more than one percent
escape could corrupt non-ASCII characters in its value.

Keep key characters out of the value's encoding check.

Assisted-by: claude:opus-5.5
Signed-off-by: vedchaudhari <[email protected]>
PR-URL: #66553
Refs: #66175
Reviewed-By: Yagiz Nizipli <[email protected]>
@robobun robobun mentioned this pull request Oct 20, 2026
node:querystring: parse the default form natively oven-sh/bun#46106
Closed
aduh95 pushed a commit that referenced this pull request Oct 23, 2026
@anonrig @aduh95
querystring: speed up default parse and unescape
035725b
Skip the %XX walk in unescapeBuffer when the input has no '%'.
Add a dedicated '&'/'=' scanner for the default parse path so
it does not build separator code arrays or run the multi-char
state machine.

Official benchmark/querystring/querystring-parse.js:
encodemany is about 38% faster, manyblankpairs about 17%,
encodelast about 10%, noencode about 8%.
Official querystring-unescapebuffer.js with no escapes is
about 36% faster.

Assisted-by: a closed-source coding agent
Signed-off-by: Yagiz Nizipli <[email protected]>
Co-authored-by: Yagiz Nizipli <[email protected]>
PR-URL: #66175
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
aduh95 pushed a commit that referenced this pull request Oct 23, 2026
@vedchaudhari @aduh95
querystring: fix value decoding after encoded keys
22f286b
In the non-default parse() path, a key with more than one percent
escape could corrupt non-ASCII characters in its value.

Keep key characters out of the value's encoding check.

Assisted-by: claude:opus-5.5
Signed-off-by: vedchaudhari <[email protected]>
PR-URL: #66553
Refs: #66175
Reviewed-By: Yagiz Nizipli <[email protected]>
aduh95 pushed a commit that referenced this pull request Oct 28, 2026
@anonrig @aduh95
querystring: speed up default parse and unescape
0c9ade5
Skip the %XX walk in unescapeBuffer when the input has no '%'.
Add a dedicated '&'/'=' scanner for the default parse path so
it does not build separator code arrays or run the multi-char
state machine.

Official benchmark/querystring/querystring-parse.js:
encodemany is about 38% faster, manyblankpairs about 17%,
encodelast about 10%, noencode about 8%.
Official querystring-unescapebuffer.js with no escapes is
about 36% faster.

Assisted-by: a closed-source coding agent
Signed-off-by: Yagiz Nizipli <[email protected]>
Co-authored-by: Yagiz Nizipli <[email protected]>
PR-URL: #66175
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
aduh95 pushed a commit that referenced this pull request Oct 28, 2026
@vedchaudhari @aduh95
querystring: fix value decoding after encoded keys
0dc3498
In the non-default parse() path, a key with more than one percent
escape could corrupt non-ASCII characters in its value.

Keep key characters out of the value's encoding check.

Assisted-by: claude:opus-5.5
Signed-off-by: vedchaudhari <[email protected]>
PR-URL: #66553
Refs: #66175
Reviewed-By: Yagiz Nizipli <[email protected]>
@leapmux-renovate leapmux-renovate Bot mentioned this pull request Nov 1, 2026
chore(deps): Update Node.js to v26 leapmux/leapmux#578
Merged
aduh95 pushed a commit that referenced this pull request Nov 11, 2026
@anonrig @aduh95
querystring: speed up default parse and unescape
b17cc2f
Skip the %XX walk in unescapeBuffer when the input has no '%'.
Add a dedicated '&'/'=' scanner for the default parse path so
it does not build separator code arrays or run the multi-char
state machine.

Official benchmark/querystring/querystring-parse.js:
encodemany is about 38% faster, manyblankpairs about 17%,
encodelast about 10%, noencode about 8%.
Official querystring-unescapebuffer.js with no escapes is
about 36% faster.

Assisted-by: a closed-source coding agent
Signed-off-by: Yagiz Nizipli <[email protected]>
Co-authored-by: Yagiz Nizipli <[email protected]>
PR-URL: #66175
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 11, 2026
@vedchaudhari @aduh95
querystring: fix value decoding after encoded keys
3f08131
In the non-default parse() path, a key with more than one percent
escape could corrupt non-ASCII characters in its value.

Keep key characters out of the value's encoding check.

Assisted-by: claude:opus-5.5
Signed-off-by: vedchaudhari <[email protected]>
PR-URL: #66553
Refs: #66175
Reviewed-By: Yagiz Nizipli <[email protected]>
@github-actions github-actions Bot mentioned this pull request Nov 20, 2026
2026-11-30, Version 24.23.0 'Krypton' (LTS) #67663
Open
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@vedchaudhari @gabylb
querystring: fix value decoding after encoded keys
63f28ab
In the non-default parse() path, a key with more than one percent
escape could corrupt non-ASCII characters in its value.

Keep key characters out of the value's encoding check.

Assisted-by: claude:opus-5.5
Signed-off-by: vedchaudhari <[email protected]>
PR-URL: nodejs#66553
Refs: nodejs#66175
Reviewed-By: Yagiz Nizipli <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@gurgunday gurgunday gurgunday approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. needs-ci PRs that need a full CI run. querystring Issues and PRs related to the built-in querystring module.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@anonrig @nodejs-github-bot @jasnell @gurgunday @panva
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.