Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR should speed up type handling immensely. The list of first oder types is now a map of a list instead of a list. The issue is that we have a lot of "types" (remember, a "type" is a unique combination of a scope and a name), we potentially have many scopes and a simple "myType" can exist as multiple
Type
nodes before the type resolver harmonises this. In order to at least have unique types per scope, we iterate existing types and return one that matches the name/scope combination. This was previously done over the complete list and is now only restricted to those types whos name matches in the first place.This is more a workaround than a complete solution to the problem of types but should at least be significantly faster now.
As a benchmark I parsed http://github.com/openstack/glance. This speeds up the parsing from 73s to 42s.
Before:
After: