Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove schema building caches #7624

Merged
merged 2 commits into from Sep 26, 2023
Merged

Remove schema building caches #7624

merged 2 commits into from Sep 26, 2023

Conversation

adriangb
Copy link
Member

@adriangb adriangb commented Sep 26, 2023

Fixes #7611

Long term I think a plan to allow pydantic-core to minimize the validation runtime cost of using referenced schemas (pydantic/pydantic-core#989) makes the most sense, but this will do for now. We may even be able to add back some of the caching, but will have to be smarter about it.

This degrades the performance of this schema building benchmark from 2.5s to 3s on my laptop.

Selected Reviewer: @dmontagu

@adriangb adriangb self-assigned this Sep 26, 2023
@adriangb adriangb added the relnotes-fix Used for bugfixes. label Sep 26, 2023
@adriangb
Copy link
Member Author

please review

@cloudflare-pages
Copy link

cloudflare-pages bot commented Sep 26, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: f65714f
Status: ✅  Deploy successful!
Preview URL: https://ca833107.pydantic-docs2.pages.dev
Branch Preview URL: https://disable-schema-building-cach.pydantic-docs2.pages.dev

View logs

@adriangb
Copy link
Member Author

adriangb commented Sep 26, 2023

TODO: add a test for #7611 Done

Co-authored-by: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recurse KeyError when using several BaseModels
3 participants