SPONSORS:






User Tag List

Results 1 to 2 of 2
  1. #1
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Slow, memory-hogging Java app\'s - a fix

    Most if not all of us have run into problems with slow operations and memory issues with
    Java-based applications. The longer you run them, the more memory they eat up, the slower they get, and the more bizarre and inconsistent their behavior becomes.

    I discovered an easy way to alleviate these issues for Window-based systems. All you have to do is periodically minimize the Java MainWins, then restore only the one that you're currently using. I've seen as much as 40 meg of memory released by a minimized application. You'll find that interactive responsiveness is dramatically improved.

    Minimizing apparently tells the operating system that you're 'done' with the application; that it can release all accumulated, unused memory. Note that this also works with Window's-based applications but since they are inherently better at memory management, the effect is less
    dramatic.

    For my own operations I've implemented a minimize_all() function that drives the NT/2000 Task Manager. It runs at the beginning of every TestCaseEnter() and at every 10-count inside every application-interactive loop.

    You can experiment with this solution by simply opening up the Task Manager and taking note of the Memory Usage on the Processes tab for your application before and after minimizing and after restoring it. The application will get slightly larger than its minimized size after it is restored, but it will almost always be much smaller than what it was before it was minimized.

    Note that using the "Minimize All Window" from a TaskBar right-click, while convenient, does not elicit the same effect.

    Enjoy.

    John


    ------------------

  2. #2
    Senior Member
    Join Date
    Mar 2000
    Location
    pisctaway, NJ USA
    Posts
    188
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Slow, memory-hogging Java app\'s - a fix

    When a friend of mine found it, I asked around and nobody knew WHY it was doing that. Whenever I did it, it always gave me a feeling as if I was "cheating" and I stayed away from it because of a lack of explantion. After some investigation I noticed one thing.

    When the window is restored after minimized, you will notice a large chunk of physical memory pages to virtual memory (on taskmanger you can add a VM coluum). I am not too experieneced with memory leak testing, but I would assume that objects stored in physical or virtual memory would be the same; therefore memory is still leaking.

    The ultimate test, which I never got a chance to do, is get a application that eventually gets the "OUT OF MEMORY" exception and right before the point of destruction (for my app is was 86 megs), minimize it till see if the fault DOES not occur.

    Anyhow, I too am on the quest of low memory leaking with JAVA+SILK

    Anthony

    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 04:05 PM.

Copyright BetaSoft Inc.