AOT Compilation Optimization

This post will talk about a small optimization that developers can do within their code to reduce the amount of time taken for AOT compilation of their application I would recommend developers to read this post to understand what is meant by AOT compilation.

One of the intermediate steps in AOT compilation requires LLVM to process the LLVM bytecode and to optimized LLVM bytecode. In case one of your function has a lot of actionscript code (~30000 lines) then the corresponding LLVM code is around 1.3 million lines. LLVM is known to perform badly (compilation time) on large functions. As a recommendation, actionscript developers should break down on large function into smaller functions to reduce the AOT compilation time. They need not change any code, just break a large function into many smaller functions to reduce AOT compilation time significantly.

One Response to AOT Compilation Optimization

  1. Karl says:

    30,000 lines of code in a single function? That can’t be right.