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.
As the title says, this is (yet another) round of optimizations this time focused on queries. It allows labels to be cached in the
Introspector
and used more efficiently for queries andquery_label
. Overall this gives us a small but measurable performance gain of 15-30% depending on the scenario. Cold gains (as always) are a little lower but it brings us down to (almost) the ~5s compile times.This also improves the allocation pattern of
Introspector
to allow it to pre-allocate larger structures from the previousIntrospector
's sizes. Also movesIntrospector
intoDocument
allowing the PDF export code to re-use the existing introspector instead of creating its own. These two changes might seem esoteric and undeeded, but their impact is measurable at around a ~50ms reduction in compile time across both incremental and cold.