B4J Question Chewing up memory

Discussion in 'B4J Questions' started by Peter Simpson, Mar 31, 2015.

  1. Peter Simpson

    Peter Simpson Expert Licensed User

    Hiya all,
    I've developed a really small app (just 430 lines of code) in B4J but it chews up memory like mad then releasing it again, then chews up memory, then releasing it again, then chews up memory, then releasing it again etc.

    My question is simple, is this memory action indicative of a Java app or is my app just doing something rather silly.

    I can't really upload the source code because the app relies on a customer registration key for an online service to run.

    Blue is the memory usage of my B4J app. My app uses a timer that runs every 60 minutes.
    Untitled-1.png

    Cheers...
     
    Last edited: Apr 1, 2015
  2. Erel

    Erel Administrator Staff Member Licensed User

    It doesn't look normal to me. You are testing it in release mode, right?
     
  3. Peter Simpson

    Peter Simpson Expert Licensed User

    Hello @Erel,
    Yes I am testing in release mode, the project is a GUI with only one very small layout file measuring 460 x 166. I'm using jdk1.8.0_31 and am now completely lost. jHttpUtils2 is ran every 60 minutes only once and only for about 2 seconds. jRandonAccessFile is only read one at the start of the program.

    I'm using the following libraries.
    Libs.png

    I will admit it, I was completely shocked when my nephew told me about its Windows memory usage and just how memory hungry my little program is.

    Thank you...
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Hard to say without seeing the code...
     
  5. Peter Simpson

    Peter Simpson Expert Licensed User

    Hmm okay, can I email it to you @Erel? I can't post the code as it's a completed project.

    Cheers...
     
    Last edited: Apr 2, 2015
  6. alienhunter

    alienhunter Active Member Licensed User

    Hi ,
    hmmm, i noticed the same thing , i was working with launch4j where i had a memory limit and the app was crashing after a while
    running the jar i noticed too that the memory is zig zag up same graph as peter (500 mb + ) and i am running timers too
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    If you can reproduce it in a small app then it will be better.
     
  8. TomDuncan

    TomDuncan Active Member Licensed User

    A couple of days ago I had a crash on the raspberry Pi.
    While running my web app it chews up around 2% per day of ram.
    Will keep it running for a week and give you the results.
    Tom
     
  9. Erel

    Erel Administrator Staff Member Licensed User

    Please start a new thread for this.
     
Loading...
  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