Android Question Java Runtime PC resource hog

Foz

Member
Licensed User
Longtime User
I've just been reduced to an underpowered PC with not much ram, and I was wondering why it was running sluggish, so I checked the Task Manager, and spied Java Runtime running at 100% cpu (dual core), and 900mb RAM.

I figured that it must have been some maintenance task, so I flicked the priority down to Low and carried on a for few more minutes when the sluggish performance reappeared. Checking the Java Runtime, it had gone back to Normal priority. Continuing like this for another ten minutes, I finally had enough and closed everything down.

As soon as B4A was closed, the Java Runtime also closed. I reopened B4A and Java started eating up resources again. Closed B4A and Java shut down.

So I uninstalled the Java Runtime and tried again. And the Java Runtime started up.
So I renamed the Java Runtime folder that comes with the JDK. Started up B4A and the Java Runtime did NOT start.
However, I not cannot compile, as it requires the Runtime!

I understand that Java is required for compiling, but is it required for running of the IDE? And is it required to run flat out?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Compilation will be longer.

The optimized dexer processes the libraries in the background and then wait until you compile your app and only processes your code. When it is disabled it will need to process everything during compilation.

My guess is that you are using Google Play Services which is a large library and it makes the "dexing" step much heavier.
 
Upvote 0

Foz

Member
Licensed User
Longtime User
Ah, excellent guess! :D

I don't mind waiting during compilation - I've changed it and it takes about 90 seconds to compile (54 seconds for the dexer), which makes it about 30 seconds slower than it previously was.

Superb - thanks Erel!
 
Upvote 0
Top