Performance of referencing library vs deprecated jsonschema.RefResolver is very bad when there are a lot of references in schema
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- python
- 領域
- performance
調査の方向性
リンクされたテストデータとプレートリーダースキーマを使って報告された検証ケースを再現し、jsonschema 4.17.0 と 4.18.0 を比較します。まず tests/parsers/moldev_softmax_pro とその 26 テストの実行時間から始め、次に参照解決と検証の経路を追跡してリグレッションを特定します。原因が切り分けられ、大きな参照を含むスキーマで報告された遅延が発生しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hello!
I have a library that formats scientific data into a JSON schema called the Allotrope Standard Model (ASM)
The validation schemas are fairly large and complicated compared to other schemas I've seen in discussion boards, and are very modular, meaning there are a lot of references. In allotropy we store the ASM schemas directly, and remove all remote references, replacing them with local references under $defs.
We are finding that validating against the schemas using jsonschema version 4.18.0 takes ~20x longer than 4.17.0.
As a concrete example:
Validating this data: https://raw.githubusercontent.com/Benchling-Open-Source/allotropy/refs/heads/main/tests/parsers/moldev_softmax_pro/testdata/MD_SMP_luminescence_endpoint_example08.json
Against this schema: https://github.com/Benchling-Open-Source/allotropy/blob/main/src/allotropy/allotrope/schemas/adm/plate-reader/REC/2024/06/plate-reader.schema.json
takes ~3.5s on 4.17.0 and ~55s on 4.18.0
This translates to a runtime for all 26 tests in tests/parsers/moldev_softmax_pro of ~30s in 4.17.0 to ~6m in 4.18.0
- 主要言語
- Python
- スター
- 53
- フォーク
- 27
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 8
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python-jsonschema/referencing のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
python-jsonschema/referencing#366 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
python-jsonschema/referencing#257 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
python-jsonschema/referencing#226 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
python-jsonschema/referencing#160 · コメント 3 件 · リアクション 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
python-jsonschema/referencing#119 · コメント 4 件 ·
python-jsonschema/referencing の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
anthropics/skills#1811 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
speaches-ai/speaches#678 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
datalayer/mcp-compose#42 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
conda-forge/spacy-feedstock#177 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
UKGovernmentBEIS/inspect_evals#2523 ·