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

Use for-loop instead of slower any() with generator expression #66

Merged
merged 10 commits into from
Sep 15, 2021
Merged

Use for-loop instead of slower any() with generator expression #66

merged 10 commits into from
Sep 15, 2021

Conversation

jpmckinney
Copy link
Contributor

@jpmckinney jpmckinney commented Oct 6, 2020

Drops time spent in type validator from 13% to 7%

Before:

output2

After:

output

@jpmckinney
Copy link
Contributor Author

https://github.com/OpenDataServices/cove/pull/609/files#diff-e4978c21ecf1ac03267a96314f0f0e88 added an early return in JsonRefResolver which skipped over add_is_codelist. If I git checkout HEAD~1 from that commit, the code doesn't have the early return. So, I think it was introduced in error.

@odscjames odscjames changed the base branch from master to main November 11, 2020 13:42
Bjwebb
Bjwebb previously approved these changes Sep 6, 2021
@Bjwebb
Copy link
Member

Bjwebb commented Sep 14, 2021

This is causing the lib-cove-oc4ids tests to fail, and I've not had chance to dig into what's going on, so leaving this unmerged for now.

@jpmckinney
Copy link
Contributor Author

jpmckinney commented Sep 14, 2021

I think 3a67f14 wasn't working as expected, because it was being called on non-dereferenced schema.

I also reverted the corresponding f91c564 89e8d26 afee2ae

@jpmckinney
Copy link
Contributor Author

Re-measuring using the commands in open-contracting/lib-cove-oc4ids#23, the time spent in the type validator drops from 10% to 6%.

Before:

output2

After:

output

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