Skip to content

Conversation

adriangb
Copy link
Member

@adriangb adriangb commented Sep 22, 2023

Selected Reviewer: @hramezani

@adriangb adriangb added the relnotes-performance Used for performance improvements. label Sep 22, 2023
@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: a9c0895
Status: ✅  Deploy successful!
Preview URL: https://ac3b7f1e.pydantic-docs2.pages.dev
Branch Preview URL: https://allow-disabling-schema-valid.pydantic-docs2.pages.dev

View logs

@adriangb
Copy link
Member Author

please review

@adriangb adriangb merged commit b3c6380 into main Sep 22, 2023
@adriangb adriangb deleted the allow-disabling-schema-validation branch September 22, 2023 14:19
@mrtolkien
Copy link

Just wanna say that using PYDANTIC_SKIP_VALIDATING_CORE_SCHEMAS=true combined with model_config = ConfigDict(defer_build=True) in my AWS Lambda reduced startup time from 4s to 1s.

I have a common library of Pydantic objects for multiple Lambdas, which mean a given one only uses a small subset of them despite them being imported with the library.

I'm not exactly sure what both those things do tbh, but it worked for my use-case 😬

@MarkusSintonen
Copy link
Contributor

@adriangb would it be possible to change the logic here so that the env would be boolified? So we could use PYDANTIC_SKIP_VALIDATING_CORE_SCHEMAS=false to do the validation eg in CI but omit it in local tests (via pytest_env in pyproject would use PYDANTIC_SKIP_VALIDATING_CORE_SCHEMAS = "true")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review relnotes-performance Used for performance improvements.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants