Performance of referencing library vs deprecated jsonschema.RefResolver is very bad when there are a lot of references in schema
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 52/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- python
- 领域
- performance
调研方向
使用链接的测试数据和 plate-reader schema 重现报告的验证用例,并比较 jsonschema 4.17.0 与 4.18.0。先从 tests/parsers/moldev_softmax_pro 及其 26 个测试的运行时间开始,然后跟踪引用和验证路径,以确定回归问题。完成的标准是已隔离原因,并且包含大型引用的 schema 不再出现报告中的性能下降。
由索引模型根据 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
- 平均合并
- 17 小时 55 分钟
- 30 天内合并 PR
- 8
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
python-jsonschema/referencing 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 45/100
python-jsonschema/referencing#366 ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
python-jsonschema/referencing#257 ·
维护者通常 2 天内回复
-
难度 5/5 一周以上 新手友好度 20/100
python-jsonschema/referencing#226 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 25/100
python-jsonschema/referencing#160 · 3 条评论 · 2 个 reaction ·
维护者通常 2 天内回复
-
难度 5/5 一周以上 新手友好度 30/100
python-jsonschema/referencing#119 · 4 条评论 ·
维护者通常 2 天内回复
查看 python-jsonschema/referencing 的全部 Issue
相似的 Issue
-
needs triage
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
openvinotoolkit/openvino_notebooks#3665 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
docs
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
benchmark-gap
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复