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

Fix Bottleneck when Handling Recursive Types #118

Merged
merged 2 commits into from
Jul 2, 2020

Conversation

seandstewart
Copy link
Owner

As part of the changes to handle recursive types, we added recursion detection. We re-worked it in the last version to minimize its impact. However, it was still significantly hampering performance at compile-time.

This resolves that bottleneck by removing the recursion check and adding awareness of "parent" types when resolving constraints and schemas.

@codecov
Copy link

codecov bot commented Jul 2, 2020

Codecov Report

Merging #118 into master will decrease coverage by 0.23%.
The diff coverage is 87.91%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #118      +/-   ##
==========================================
- Coverage   96.69%   96.46%   -0.24%     
==========================================
  Files          36       36              
  Lines        3815     3842      +27     
==========================================
+ Hits         3689     3706      +17     
- Misses        126      136      +10     
Flag Coverage Δ
#3.7 96.40% <87.64%> (-0.22%) ⬇️
#3.8 96.45% <87.91%> (-0.24%) ⬇️
#unittests 96.46% <87.91%> (-0.24%) ⬇️
Impacted Files Coverage Δ
typic/constraints/array.py 98.75% <ø> (ø)
typic/constraints/mapping.py 98.86% <ø> (-0.57%) ⬇️
typic/klass.py 100.00% <ø> (+2.32%) ⬆️
typic/util.py 94.09% <ø> (+0.78%) ⬆️
typic/ext/schema/schema.py 88.42% <78.72%> (-1.03%) ⬇️
typic/serde/resolver.py 92.10% <88.88%> (-0.72%) ⬇️
typic/constraints/common.py 92.83% <100.00%> (-2.93%) ⬇️
typic/constraints/factory.py 100.00% <100.00%> (+2.98%) ⬆️
typic/ext/schema/field.py 99.27% <100.00%> (+<0.01%) ⬆️
typic/serde/common.py 94.54% <100.00%> (-0.30%) ⬇️
... and 9 more

Continue to review full report at Codecov.

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

@seandstewart seandstewart merged commit 59fb59d into master Jul 2, 2020
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.

None yet

1 participant