Skip to content

Remove schema building caches#7624

Merged
adriangb merged 2 commits intomainfrom
disable-schema-building-caches
Sep 26, 2023
Merged

Remove schema building caches#7624
adriangb merged 2 commits intomainfrom
disable-schema-building-caches

Conversation

@adriangb
Copy link
Copy Markdown
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
Copy Markdown
Member Author

please review

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-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
Copy Markdown
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