Thushara Piyasekara
Thushara Piyasekara
> @Thushara-Piyasekara , According to the offline discussion with @heshanpadmasiri and the team, shall we add test functions as a entry point to find the non-used elements. @SasinduDilshara Thank you...
### Optimizing Ballerina Code For Ballerina level optimizations 4 approaches were tried out, 1. Analyzing the AST and deletion through ASM. 2. Analyzing the BIR and deletion through ASM. 3....
### 1. Analyzing the AST and deletion through ASM As the first approach, BLangPackage(AST) was analyzed and BlangInvocation nodes were divided into “USED” and “UNUSED”. This was done through creating...
### 2. Analyzing the BIR and deletion through ASM Since the BIR phase is after the desugar phase, it is possible to analyze the generated functions as well. We had...
### 3. Analyzing the BIR and generating the optimized thin jars from scratch It was possible to generate optimized thin jars by cleaning up the unused function nodes and type...
### 4. Analyzing only the used BIR nodes and generating the optimized thin jars from scratch All previous optimizers were located inside “CompilerPhaseRunnner” class. One of the drawbacks of being...
### Optimizing Native Dependencies At compiler level only the ballerina source code could be analyzed. It was not possible to detect unused constructs of java library dependencies. Therefore we had...
**22/01/2024 Update** - Connected the native dependency optimizer to the compiler. Now the optimized fat jar is outputted by default into the target folder. - Having trouble with keeping the...
GraalVM native executable comparison :- https://docs.google.com/document/d/1R0VTjlMSSCSSjTXWfJ5eK-ISKU5NDxWK2XHpQOebcWY/edit?usp=sharing
**12/02/2024 Update** - Happy path for `bal build --optimize` flag is working. Will have to improve the implementation later. - Added whitelisting for native classes that are accessed using Java...