Repository navigation
Move render caches into per-parse store memos - #5157
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Merging this PR will degrade performance by 29.4%2 warnings
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Breaking Change AnalysisResult: No breaking changes detected Reasoning: This PR is an internal refactor that moves values cached on mutable models, fields and data type nodes (the dedup key cache, the self reference cache, the nested model required constructor fields marker, the enum member indexes and the rendered union members) into a per-parse memo owned by the generation store, active while Parser.parse runs. Everything removed is private: underscore attributes, the _SEMANTIC_CACHE_KEYS class variable, internal fact and allowlist rows, and NodeKey and FieldKey moving between private modules. The _iter_union_member_type_hints helper now returns a list and the private _same_value helper no longer compares tuples element by element. Public methods such as get_dedup_key, self_reference, invalidate_render_caches, clear_imports_cache and invalidate_semantic_caches keep their signatures and now drop memo entries. No existing expected output changed, and the new tests show output matching version 0.86.0. The new DATAMODEL_CODE_GENERATOR_CHECK_RENDER_MEMOS debug check is opt-in through an environment variable. There are no template, CLI, default, Python version or error-reporting changes. The only user-visible effect is that values read outside a parse are recomputed each time instead of cached, which can cost speed but gives the same results, so nothing here is breaking. This analysis was produced by the release draft workflow |
Summary by CodeRabbit
New Features
Bug Fixes
Refactor