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

Avoid needless filters on inferred strategies #24

Closed
Zac-HD opened this issue Sep 29, 2019 · 0 comments
Closed

Avoid needless filters on inferred strategies #24

Zac-HD opened this issue Sep 29, 2019 · 0 comments

Comments

@Zac-HD
Copy link
Member

Zac-HD commented Sep 29, 2019

#22 notes, among other things, that hypothesis-jsonschema strategies for simple schemas are often slower than the obvious translation. Some of this is unavoidable, as we try some extensive transformations of the schema which are necessary to avoid pathologically poor performance on certain complex schemas, but not all.

There are a range of points at which we output slower strategy which always works, instead of checking whether a simpler one would be correct. For example we always apply a filter to string strategies that validate their length, which is necessary only for regex-based or format-based strings and could be skipped even there in the common case that min_size=0 and max_size=inf.

@Zac-HD Zac-HD changed the title Generic performance improvement issue Avoid needless filters on inferred strategies Dec 9, 2019
@Zac-HD Zac-HD closed this as completed in 3925bcf Apr 14, 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

No branches or pull requests

1 participant