Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Performance regression on crypto `createPublicKey` and `createPrivateKey` APIs after node v17

Open
#944 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript, node.js
Domain
performance

Research direction

Start with verify.js around lines 122-125 and review the linked Node.js issue about createPublicKey and createPrivateKey performance. Reproduce the profiler-server workload across Node v16 and v18, then determine whether reducing these calls is safe. Done requires evidence that the regression is reduced without changing JWT verification behavior.

Written by the indexing model from the issue text.

Description

Hi, we use this package for our profiler-server repository. After upgrading the node version from v16 to v18, we observed ~30% performance regression. And after some investigation we realized that it's because of the createPublicKey and createPrivateKey calls that happen here:
https://github.com/auth0/node-jsonwebtoken/blob/bc28861f1fa981ed9c009e29c044a19760a0b128/verify.js#L122-L125

I also filed an issue on nodejs for the regression on those APIs. For more context, please see it here: https://github.com/nodejs/node/issues/50386

I was wondering if we can reduce the calls to these APIs in this repository with some caching mechanism maybe? I'm not sure as I'm not familiar with the code here. Wanted to ask to see if you have any ideas, thanks!

Version of this library used: 9.0.2

Dominant language
JavaScript
Stars
18.2k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from auth0/node-jsonwebtoken

All issues in auth0/node-jsonwebtoken

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.