Skip to content

Conversation

Gobd
Copy link
Contributor

@Gobd Gobd commented Jan 12, 2025

Closes #536

The benchmark results in the readme will also need updating but not sure if you wanted me to do that or run them yourselves. The results are exactly like the linked issue suggests, 50x better performance after this change.

I also added HS256 to the benchmarks because why not, and also that's what I use.

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jan 12, 2025
@ilteoood
Copy link
Contributor

I think you could also update the benchmarks, so we could also close #507

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Jan 12, 2025
@Gobd
Copy link
Contributor Author

Gobd commented Jan 12, 2025

I had to regenerated the PS512 token to get those verification benchmarks to work again. These were run on my MacBook Pro with an M2 Pro and 16GB of RAM.

@Gobd Gobd requested a review from ilteoood January 13, 2025 13:08
@simoneb
Copy link
Member

simoneb commented Feb 11, 2025

@Gobd we've done a bit of overhaul on the way we run and capture the benchmark results. When you get a chance, would you mind doing this work on top of what's in master now? I chose to replace cronometro with mitata due to issues with running is cross-platform.

@Gobd
Copy link
Contributor Author

Gobd commented Feb 12, 2025

Sure let me work on that

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Feb 12, 2025
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Feb 12, 2025
@Gobd
Copy link
Contributor Author

Gobd commented Feb 12, 2025

Done! Now you can see jsonwebtoken's performance is much more reasonable so no one panics and thinks they need to switch ASAP. I mean they do need to switch to using the keys correctly ASAP to fix their performance. I have switched to fast-jwt anyways because it was almost no work and is faster.

Copy link
Member

@simoneb simoneb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks for this!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 13, 2025
@simoneb simoneb merged commit 79208ca into nearform:master Feb 13, 2025
6 checks passed
@github-actions github-actions bot mentioned this pull request Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Benchmark results need updating

3 participants