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

Reduce the amount of full-type parsing needed for instrumentation #4322

Merged
merged 1 commit into from
Nov 29, 2022

Conversation

mcculls
Copy link
Contributor

@mcculls mcculls commented Nov 25, 2022

What Does This Do

For certain metadata (class modifiers, the names of interfaces and any super-class) we only need the outline of the declaring type, regardless whether we're matching or transforming. This PR temporarily switches the type-factory to always create outlines when looking up this kind of metadata.

The delegate check in LazyType has also been adjusted to allow re-use of full-types even when we only want outlines.

Motivation

Outline type parsing is faster and uses less memory than full-type parsing.

Additional notes

For a small apps like petclinic this reduces the amount of full-types parsed from ~1200 to less than 300

@mcculls mcculls added the tag: performance Performance related changes label Nov 25, 2022
@mcculls mcculls requested a review from a team as a code owner November 25, 2022 17:24
@mcculls mcculls force-pushed the mcculls/reduceFullTypeParsing branch 2 times, most recently from 7e5fc08 to 6cbfb8e Compare November 27, 2022 22:07
@mcculls mcculls force-pushed the mcculls/reduceFullTypeParsing branch from 6cbfb8e to db9c5cb Compare November 27, 2022 22:20
@mcculls mcculls merged commit 9eb605c into master Nov 29, 2022
@mcculls mcculls deleted the mcculls/reduceFullTypeParsing branch November 29, 2022 13:39
@github-actions github-actions bot added this to the 1.2.0 milestone Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tag: performance Performance related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants