Community
Participate
Working Groups
If I check out all of Eclipse from CVS, then memeory usage in Windows goes from 35MB to 247MB. We should investigate this.
And with just doing an "import" from source?
I didn't try an import since that operation only works on one project at a time. However, I tried the operation again with auto-build off and the memory usage went from 37MB to 118MB so it CVS is only one of the culprits. Looking through the code, I also noticed that there are several places that we end up creating strings when we don't need to. The most notable are when reading info from the server (we read as Strings and then convert to bytes) and when wrting to disk (we wrap in a String to use a String based write method).
Created attachment 3984 [details] Optimize-it memory snapshot after GC ran on checkout
I tried to find out the following: Q1. How much memory does the CVS plugins require from the heap to maintain it's internal data structures for several checked out projects? A1. For all of jdt and team plugins checked out from CVS the session properties in core require 1.8 MBs. And the remaining memory for internal data structures as shown in the 3984 attachement shows a minimal amount (e.g. < 5 MB). Nowhere near the numbers as seen in the task list. Q2. How much of the memory the task list shows as "being used" is actually handles that are a direct result of the CVS plugin. A2. The value shown in the task list is misleading since it actually shows the memory "reserved" by the vm and not necessarily "used". This was confirmed using Optimize-it to view the Heap size and actual memory used. Summary: ======= 1. Reducing the memory spikes can help reduce the amount of heap the vm reserves. Michael has already identified some areas in the CVS plugin where some optimizations could be made. 2. The CVS plugin doesn't appear to hog too much heap for CVS related meta-information for shared projects. In any case, the numbers found with Optimize-it support this claim. 3. The memory used for CVS sync information in session properties seems reasonable (e.g. < 2MB)
Created attachment 3993 [details] Heap size versus actual memory used during checkout This patch shows how memory spikes affect the heap memory reserved by the vm. The '*' at time 9:30 shows the memory before the checkout. The end of the data represents the end of the checkout and build. Before checkout (empty workspace): 22MB (actual), 48MB (heap) After checkout: 47MB (actual), 65MB (heap) Restart of workbench: 46MB (actual), 65MB (heap)
Finished investigation for 2.1.