What happened? The performance of jsonwebtoken 9.0.2 is 50 times slower than 8.5.1
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 28/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, node.js
- Domain
- performance
Research direction
Start with the linked node-jwt-benchmark reproduction and compare jsonwebtoken 8.5.1 with 9.0.2 under Node v20.12.2, focusing on the reported HS256 encoding and decoding results. Done means the source of the regression is identified and the benchmark shows verified improvement without breaking the reported algorithms.
Written by the indexing model from the issue text.
Description
Description
The performance of jsonwebtoken 9.0.2 is 50 times slower than 8.5.1, mainly in the HS256 algorithm.
The encoding speed has slowed down by 53 times, and the decoding speed by 34 times.
8.5.1 benchmark results
Encoding
HS256 x 120,423 ops/sec ±0.33% (91 runs sampled)
RS256 x 793 ops/sec ±0.50% (94 runs sampled)
ES256 x 2,418 ops/sec ±0.99% (94 runs sampled)
Fastest encoder is HS256
Decoding
HS256 x 87,990 ops/sec ±0.93% (95 runs sampled)
RS256 x 5,921 ops/sec ±0.89% (93 runs sampled)
ES256 x 4,763 ops/sec ±0.77% (94 runs sampled)
Fastest decoder is HS256
9.0.2 benchmark results
Encoding
HS256 x 2,264 ops/sec ±4.58% (78 runs sampled)
RS256 x 759 ops/sec ±0.73% (93 runs sampled)
ES256 x 2,131 ops/sec ±1.08% (91 runs sampled)
Fastest encoder is HS256
Decoding
HS256 x 2,568 ops/sec ±0.93% (93 runs sampled)
RS256 x 5,527 ops/sec ±1.60% (87 runs sampled)
ES256 x 3,871 ops/sec ±1.62% (91 runs sampled)
Fastest decoder is RS256
Reproduction
https://github.com/VxRain/node-jwt-benchmark
Environment
- Node: v20.12.2
- System: Win11
- CPU: AMD R7 5800H
- Dominant language
- JavaScript
- Stars
- 18.2k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from auth0/node-jsonwebtoken
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
auth0/node-jsonwebtoken#1042 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
auth0/node-jsonwebtoken#1000 · 2 comments · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 65/100
auth0/node-jsonwebtoken#1046 ·
-
Difficulty 5/5 Over a week Newbie friendliness 10/100
auth0/node-jsonwebtoken#1034 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
auth0/node-jsonwebtoken#1032 ·
All issues in auth0/node-jsonwebtoken
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
mksglu/context-mode#1200 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
neondatabase/website#5944 ·
-
module: core
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
bigbluebutton/bigbluebutton#25849 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
jaegertracing/jaeger-ui#4506 ·