B4J Question Compiler Speed?


New Member
I have a application that I am considering porting to B4J.

It is a very large application though 117,052 lines in a dynamic language called Red.

Compilation speed and execution speed are both issues for me in Red now that my code has gotten so large.

Has anyone ever timed how many lines a minute that B4J can compile.

Does anyone have any large B4J application that take over a minute to compile?

If so do you know the approximate number of line? Just looking for a ball park figure.


B4X founder
Staff member
Licensed User
Longtime User
I don't have any numbers to give you however the slowest part during compilation is the java compilation step. The java compiler is a very mature and optimized compiler and is quite fast.

You can also split this project into several sub-projects and compile those components as libraries (jars). This will make things easier to maintain and will also improve compilation performance.
Upvote 0


Licensed User
Longtime User
I've not got anything that big to test, but 20K lines of code takes about 10 seconds in release mode and 15 seconds or so in debug. All Java 14. Program is one main code module of 18K lines, about 10 class and code modules with around a dozen libraries referenced.

Clearly, this depends on the version of Java, the processor, storage system, memory, etc.

AMD Ryzen 1700, 32Gb Ram, NVME SSD with processor slightly overclocked.

Never felt it was slow, but if I work on my old laptop then I really notice the difference.
Upvote 0