Skip to content

refactor: ⚡ hardcoded/preloaded default headers performance upgrade#100

Merged
ixunio merged 1 commit intomainfrom
hardcoded-header-optim
Jan 28, 2026
Merged

refactor: ⚡ hardcoded/preloaded default headers performance upgrade#100
ixunio merged 1 commit intomainfrom
hardcoded-header-optim

Conversation

@ixunio
Copy link
Copy Markdown
Owner

@ixunio ixunio commented Jan 25, 2026

Performance upgrade: default/frequent encoded headers {"alg": "XXX", "typ": "JWT"} and {"alg": "XXX"} are hardcoded and preloaded in memory for each algorithm:

  • ⚡ during encoding: use default preloaded encoded headers {"alg": "XXX", "typ": "JWT"} when no custom headers is specified, skipping validation
  • ⚡ during decoding: if encoded headers is one of hardcoded, skip validation and instantly check for algorithm mismatch

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.52%. Comparing base (4294fdc) to head (d0f161c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #100      +/-   ##
==========================================
+ Coverage   99.49%   99.52%   +0.02%     
==========================================
  Files          10       10              
  Lines         993     1042      +49     
  Branches      118      122       +4     
==========================================
+ Hits          988     1037      +49     
  Partials        5        5              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ixunio ixunio force-pushed the hardcoded-header-optim branch from e5b96cf to d0f161c Compare January 25, 2026 03:17
@ixunio ixunio merged commit d0f161c into main Jan 28, 2026
11 checks passed
@ixunio ixunio deleted the hardcoded-header-optim branch January 28, 2026 22:03
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