Performance regression on crypto `createPublicKey` and `createPrivateKey` APIs after node v17
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript, node.js
- 領域
- performance
調査の方向性
まず verify.js の122~125行付近から始め、createPublicKey と createPrivateKey のパフォーマンスに関するリンク先の Node.js issue を確認します。Node v16 と v18 で profiler-server のワークロードを再現し、その後、これらの呼び出しを減らしても安全かどうかを判断します。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 ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
auth0/node-jsonwebtoken のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
auth0/node-jsonwebtoken#1042 · コメント 1 件 ·
-
`jwt.sign()` callback is executed twice for "The payload already has an "..." property" errors対応中かも @cobyfrombrooklyn-bot が 224 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
auth0/node-jsonwebtoken#1000 · コメント 2 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
auth0/node-jsonwebtoken#1048 ·
-
verify() resolves a string secret by attempting createPublicKey() first, costing 4x-52x on the HS* path対応中かも @Hashim1999164 が 18 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 65/100
auth0/node-jsonwebtoken#1046 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
auth0/node-jsonwebtoken#1034 ·
auth0/node-jsonwebtoken の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
IsmaelMartinez/repo-butler#481 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
fabriziosalmi/certmate#1207 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
vllm-project/recipes#1081 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
CommunityToolkit/Aspire#2231 ·
メンテナーはふだん 1 日以内に返信
-
[内容纠错] p2-medium-243《The internal body clock》原文缺少段落标号 A–H再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
sallowayma-git/IELTS-practice#232 ·
メンテナーはふだん 1 日以内に返信