Android Question Java Runtime PC resource hog

Discussion in 'Android Questions' started by Foz, Jul 20, 2015.

  1. Foz

    Foz Member Licensed 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?
  2. Erel

    Erel Administrator Staff Member Licensed User

    This is the optimized dexer. You can disable it by setting
    UseOptimizedDexer=False in the ini file.

    The ini file location: C:\Users\<user name>\AppData\Roaming\Anywhere Software\Basic4android

    Make sure to modify the ini file when the IDE is closed.
    lemonisdead likes this.
  3. Foz

    Foz Member Licensed User

    Thanks for this :)
    What is the disadvantage for turning it off?
  4. Erel

    Erel Administrator Staff Member Licensed 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.
    lemonisdead likes this.
  5. Foz

    Foz Member Licensed 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!
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice