Skip to content

refactor: optimize throttler header suffix computation#2558

Open
ankitbelal wants to merge 1 commit intonestjs:masterfrom
ankitbelal:feature/throttler-header-suffix
Open

refactor: optimize throttler header suffix computation#2558
ankitbelal wants to merge 1 commit intonestjs:masterfrom
ankitbelal:feature/throttler-header-suffix

Conversation

@ankitbelal
Copy link
Copy Markdown

@ankitbelal ankitbelal commented Mar 23, 2026

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

The throttler guard calls the suffix-computing method multiple times when setting headers.

Issue Number: N/A

What is the new behavior?

The suffix is precomputed once per request, reducing repeated method calls. No functional change.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Fully covered by existing HTTP Context tests; no new test case needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant