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

Optimize memory consumption of Infos #4978

Merged
merged 4 commits into from
Apr 14, 2024
Merged

Optimize memory consumption of Infos #4978

merged 4 commits into from
Apr 14, 2024

Conversation

gzm0
Copy link
Contributor

@gzm0 gzm0 commented Apr 13, 2024

This reduces the retained size on the test suite for the infos as
follows:

Component Before [MB] After [MB]
BaseLinker 26 20
Refiner 22 17

The (incremental) runtime of the Analysis is unaffected.

This reduces the retained size on the test suite for the infos as
follows:

BaseLinker: 26MB -> 24MB
Refiner:    22MB -> 20MB
This avoids unnecessary calls to `addStaticDependency`, but more
importantly, it will allow us to flatten the structure of
`ReachabilityInfoInClass`.
This allows us to remove a field from `ReachabilityInfoInClass` which
reduces the retained size on the test suite for the infos as follows:

BaseLinker: 24MB -> 23MB
Refiner:    20MB -> 20MB (within rounding error)
@gzm0
Copy link
Contributor Author

gzm0 commented Apr 13, 2024

Analyzer timings (incremental):

plot
logger-timings.csv

@gzm0
Copy link
Contributor Author

gzm0 commented Apr 13, 2024

Fixed the trailing commas.

Copy link
Member

@sjrd sjrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

I only found a typo, but otherwise LGTM.

This reduces the retained size on the test suite for the infos as
follows:

BaseLinker: 23MB -> 20MB
Refiner:    20MB -> 17MB
@sjrd sjrd merged commit eb160f1 into scala-js:main Apr 14, 2024
3 checks passed
@gzm0 gzm0 deleted the single-info branch April 28, 2024 08:27
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.

None yet

2 participants