This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 49230

Summary: Memory leaks in IDE [found by performance tests] - NEED INVESTIGATE
Product: ide Reporter: Marian Mirilovic <mmirilovic>
Component: PerformanceAssignee: _ ttran <ttran>
Status: CLOSED WONTFIX    
Severity: blocker CC: issues
Priority: P1 Keywords: PERFORMANCE, UMBRELLA
Version: 3.x   
Hardware: Sun   
OS: Solaris   
Issue Type: TASK Exception Reporter:
Bug Depends on: 49238, 49240, 49241, 49244, 49245, 49246, 49247, 49248, 49258    
Bug Blocks:    

Description Marian Mirilovic 2004-09-18 09:02:28 UTC
I've run performance test suite with focus on
possible memory leaks.

I reused the same test cases (tests and test
infrstructure) as we use for measure UI
responsiveness.
http://performance.netbeans.org/qa/Performance.html

I would like to point out here, there is no call
for you to fix reported memory leaks, first of all
leaks must be find, this is only  hint, there are
many places where leak can be found (test harness,
test case, xtest , jemmy, jelly....).

Performance team members should go through all
reported issues and reassigne it against
appropriate person/module or after short
investigation close it with appropriate comments.


PerformanceTestCase uses next :
-------------------------

   runGC(5);
   initialize();

   repeate X-times {
           prepare();
           open();
           close();
 
           runGC(3);
            
            Runtime runtime = Runtime.getRuntime();
            memoryUsage[i] = runtime.totalMemory()
- runtime.freeMemory();
    }

    findMinimumOfMeasuredMemoryUsages();
        
    logDeltasAgainstMinimumMemory();

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

and runGC(X) is implemented this way :

-------------
    public void runGC(int i){
        for(int gc=0; gc < i; gc ++){
            try{
                System.runFinalization();
                System.gc();
                Thread.currentThread().sleep(500);
                System.gc();
                Thread.currentThread().sleep(500);
                System.gc();
                Thread.currentThread().sleep(500);
            }catch(Exception exc){}
        }
    }
-------------------
Comment 1 Jaroslav Tulach 2008-10-24 16:14:30 UTC
Now we are using assertGC in commit validation as well as in various qa-funcational tests.
Comment 2 Marian Mirilovic 2009-12-03 03:24:16 UTC
v/c