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

wip precompiled schema #993

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

wip precompiled schema #993

wants to merge 5 commits into from

Conversation

davidhewitt
Copy link
Contributor

Change Summary

Make it possible to re-use schema validators; the ultimate inlined definition!

Related issue number

N/A

Checklist

  • Unit tests for the changes exist
  • Documentation reflects the changes where applicable
  • Pydantic tests pass with this pydantic-core (except for expected changes)
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 26, 2023

CodSpeed Performance Report

Merging #993 will degrade performances by 15.62%

Comparing dh/reuse-validator (827a905) with main (1a966d5)

Summary

⚡ 3 improvements
❌ 1 regressions
✅ 134 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main dh/reuse-validator Change
test_complete_core_lax 1.4 ms 1.2 ms +12.37%
test_dont_raise_error_no_info 29.7 µs 26.5 µs +12.43%
test_generator_rust 35.5 µs 30.8 µs +15.19%
test_decimal_from_string_core 69.2 µs 82 µs -15.62%

@codecov
Copy link

codecov bot commented Sep 26, 2023

Codecov Report

Merging #993 (827a905) into main (1a966d5) will decrease coverage by 0.15%.
The diff coverage is 80.37%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #993      +/-   ##
==========================================
- Coverage   92.98%   92.83%   -0.15%     
==========================================
  Files         106      108       +2     
  Lines       15827    15792      -35     
  Branches       35       35              
==========================================
- Hits        14717    14661      -56     
- Misses       1103     1124      +21     
  Partials        7        7              
Files Coverage Δ
src/py_gc.rs 100.00% <100.00%> (ø)
src/serializers/extra.rs 99.08% <ø> (-0.03%) ⬇️
src/serializers/mod.rs 98.49% <100.00%> (ø)
src/serializers/type_serializers/dataclass.rs 92.72% <100.00%> (ø)
src/serializers/type_serializers/definitions.rs 93.93% <100.00%> (+0.18%) ⬆️
src/serializers/type_serializers/model.rs 94.55% <100.00%> (ø)
src/validators/any.rs 100.00% <100.00%> (ø)
src/validators/arguments.rs 99.60% <100.00%> (-0.01%) ⬇️
src/validators/bool.rs 100.00% <100.00%> (ø)
src/validators/callable.rs 96.29% <100.00%> (-3.71%) ⬇️
... and 46 more

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1a966d5...827a905. Read the comment docs.

@sydney-runkle
Copy link
Member

@BoxyUwU, have you been working on this? Can we close as stale?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants