-
Notifications
You must be signed in to change notification settings - Fork 755
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 CodeGen for executable jar #43013
Merged
heshanpadmasiri
merged 186 commits into
ballerina-platform:feature-codegen-optimizer
from
Thushara-Piyasekara:dce-project
Jul 8, 2024
Merged
Optimize CodeGen for executable jar #43013
heshanpadmasiri
merged 186 commits into
ballerina-platform:feature-codegen-optimizer
from
Thushara-Piyasekara:dce-project
Jul 8, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thushara-Piyasekara
requested review from
hevayo,
sameerajayasoma and
hasithaa
as code owners
July 1, 2024 06:41
heshanpadmasiri
approved these changes
Jul 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll merge this to feature branch and then merge it the master separately
heshanpadmasiri
merged commit Jul 8, 2024
44eb092
into
ballerina-platform:feature-codegen-optimizer
16 of 18 checks passed
13 tasks
13 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose
Depends on #42433 and #42792.
The Ballerina compiler currently includes all imported modules in their entirety within the final executable JAR. However, these modules may contain unused constructs that bloat the final size. This project proposes an optimization to remove these unused parts, resulting in several benefits:
This project is driven by the substantial benefits it brings to GraalVM native image builds. We've achieved significant improvements in both build time (up to 15.95% faster) and executable size (up to 20.9% smaller). See the attached performance comparison in the Samples section for detailed results.
Approach
We implemented a two-tier Optimization Architecture for this project,
Further implementation details can be found here.
Samples
Refer to GraalVM native build time and performance comparison for more details.
Remarks
Check List