Android Question Improve B4A speed using the video card?

yo3ggx

Active Member
Licensed User
Longtime User
Hello.
I was not able to find any post in the forum related to this question.
Can B4X IDE benefit from a good video card to speed up the compilation?
Currently I'm using a nVIDIA Quadro P600, Ryzen 7 2700 and 96GB or RAM, but it takes ~35s for a full compilation of my B4A application (~18000 lines of code).

Do you have any personal experience with better video cards? Any recommendation?
I intend to buy the new AMD Radeon Pro W7500 (or even W7600) video card for video editing and some AI work, but I wonder if I can expect some improvement in B4X IDE speed too.

Thank you.
 

BlueVision

Active Member
Licensed User
Longtime User
I think your processor architecture has more than sufficient resources for compiling. Your hardware is definitely not the problem. Adding an additional processor wouldn't change that in the slightest. The graphic clearly shows that there is no lack of available computing power. All cores are evenly utilized except for a few peaks. It's not a hardware bottleneck. The “problem” in this case is quite clearly the compiler itself. The cores process pending compiler tasks too quickly and then go into wait state. The compiler's program flow simply cannot provide enough feed to keep the processors busy. These then “suffer” from underemployment. Who can make the compiler faster? Quite simply: the compiler programmer. Now this one will almost certainly not be a beginner either. But it is in the nature of a compiler that it also uses libraries and other suppliers and has to wait for their results. This is a general problem with high-level languages and object-oriented programming. It is like it is. But no one is going to sit down and write process-oriented code in assembler, this would probably solve the problem to a large extent. Let's be honest (and I hope you understand my irony): Compile your program on an older Pentium with only one core. A few gigabytes less RAM would also be helpful. Then you know what waiting means. I know similar problems with graphics controllers. And I don't mean a graphics card. I mean high-speed PCs with the latest technology, architecturally designed to render large graphic files in digital print and then send this RAW data to a printer (e.g. a Fiery). Many users try to make their Fiery faster with more memory. But that's usually enough and more RAM doesn't help at all. It is the program flow of the rendering itself that simply takes time despite optimal programming. Providing needed resources during the compiler run produces exactly the same effect. The compiler itself has to wait because it has no other choice due to its programming. Compiling the program on another computer might not be a bad idea. You have the direct comparison for this phenomenon. Only if the CPU utilization is permanently at 100% then there is a hardware problem. Even with a slightly weaker computer, you will need similar times for the compiler to run as long as the processor does not reach its limits.
 
Upvote 0

yo3ggx

Active Member
Licensed User
Longtime User
Even with a slightly weaker computer, you will need similar times for the compiler to run as long as the processor does not reach its limits.
Upgrading the RAM from 32GB to 96GB ( for other purposes, not B4X) did not improve compiling time in B4X at all.
 
Upvote 0

yo3ggx

Active Member
Licensed User
Longtime User
This is only what the operating system shows you, in reality only one CPU is used.

But you can ask Erel if he has programmed the compiler to be multithreaded.
Not only does it use all cores (8), but also all threads (16). Are you saying that what Windows Task Manager shows is fake?
 
Upvote 0

yo3ggx

Active Member
Licensed User
Longtime User
The IDE uses many threads for all kinds of tasks.
The compiler is managed by a single background thread but some of the toolchain components are multithreaded.
This is what I observed, all processor threads are used.
 
Upvote 0
Top