-
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 #41449
Optimize CodeGen for executable jar #41449
Conversation
compiler/ballerina-lang/src/main/java/io/ballerina/projects/DeadFunctionVisitor.java
Outdated
Show resolved
Hide resolved
compiler/ballerina-lang/src/main/java/io/ballerina/projects/DeadFunctionVisitor.java
Outdated
Show resolved
Hide resolved
compiler/ballerina-lang/src/main/java/io/ballerina/projects/DeadFunctionVisitor.java
Outdated
Show resolved
Hide resolved
compiler/ballerina-lang/src/main/java/io/ballerina/projects/internal/CompilerPhaseRunner.java
Outdated
Show resolved
Hide resolved
...iler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/BIRPackageSymbolEnter.java
Outdated
Show resolved
Hide resolved
...iler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/BIRPackageSymbolEnter.java
Outdated
Show resolved
Hide resolved
...iler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/BIRPackageSymbolEnter.java
Outdated
Show resolved
Hide resolved
...ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/bir/writer/BIRBinaryWriter.java
Outdated
Show resolved
Hide resolved
...-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DeadCodeAnalyzer.java
Outdated
Show resolved
Hide resolved
...na-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/model/symbols/UsedState.java
Outdated
Show resolved
Hide resolved
compiler/ballerina-lang/src/main/java/io/ballerina/projects/OptimisedZipFile.java
Outdated
Show resolved
Hide resolved
compiler/ballerina-lang/src/main/java/io/ballerina/projects/util/CodegenOptimizationUtils.java
Show resolved
Hide resolved
compiler/ballerina-lang/src/main/java/io/ballerina/projects/CompilationOptions.java
Outdated
Show resolved
Hide resolved
compiler/ballerina-lang/src/main/java/io/ballerina/projects/JBallerinaBackend.java
Show resolved
Hide resolved
compiler/ballerina-lang/src/main/java/io/ballerina/projects/JBallerinaBackend.java
Outdated
Show resolved
Hide resolved
compiler/ballerina-lang/src/main/java/io/ballerina/projects/JBallerinaBackend.java
Outdated
Show resolved
Hide resolved
...ler/ballerina-lang/src/main/java/io/ballerina/projects/CodeGenOptimizationReportEmitter.java
Outdated
Show resolved
Hide resolved
...ler/ballerina-lang/src/main/java/io/ballerina/projects/CodeGenOptimizationReportEmitter.java
Outdated
Show resolved
Hide resolved
compiler/ballerina-lang/src/main/java/io/ballerina/projects/JBallerinaBackend.java
Show resolved
Hide resolved
...ava/org/wso2/ballerinalang/compiler/bir/codegen/bytecodeoptimizer/AnnotationNodeVisitor.java
Outdated
Show resolved
Hide resolved
...ain/java/org/wso2/ballerinalang/compiler/bir/codegen/bytecodeoptimizer/ClassNodeVisitor.java
Outdated
Show resolved
Hide resolved
...org/wso2/ballerinalang/compiler/bir/codegen/bytecodeoptimizer/NativeDependencyOptimizer.java
Outdated
Show resolved
Hide resolved
...ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/bir/codegen/JvmCodeGenUtil.java
Outdated
Show resolved
Hide resolved
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.
Looks better now just a few minor nits.
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
Closing because the implementation was merged to a separate branch in #43013. All future pull requests related to this feature will be sent to that branch. |
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