Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#944 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
领域
performance

调研方向

从 verify.js 的第122-125行附近开始,并查看关于 createPublicKey 和 createPrivateKey 性能的关联 Node.js issue。在 Node v16 和 v18 上复现 profiler-server 工作负载,然后确定减少这些调用是否安全。完成的标准是有证据表明 regression 得到降低,同时不改变 JWT 验证行为。

由索引模型根据 Issue 内容生成。

描述

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

主要语言
JavaScript
星标
18.2k
派生
1.3k
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

auth0/node-jsonwebtoken 的其他 Issue

查看 auth0/node-jsonwebtoken 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。