## Resource Data Structures

Since: 3.0
Last Modified: $Date: 2007/05/18 13:54:37 $

This section contains results on memory footprint of CVS in the Core resource plugin data structures. More specifically, CVS uses the session and persistent property caches along with the synchronizer.

### CVS Workspace Sync info caches

Checking of the cache usage requires the use of the Core spy tools. To obtain the memory footprint, perform the following steps.

1. Install the Core Spy Tools
2. Launch Eclipse
3. Checkout several projects
4. Open the Element Tree Spy to get the memory footprint. At the time of writing, CVS is the main user of these structures. In future test, ensure that others are not contributing to the tally.
5. Disconnect all the projects
6. The Element Tree Spy memory footprint should be reduced accordingly

The following snapshot of the resource element tree was taken after checking out all of the projects (294 as of 2004/05/31) in dev.eclipse.org.

    Total resource count: 89,466
    	Team private: 10,186
    	Phantom: 4,055
    	Markers: 0
    	SyncInfo: 10,432
    Number of layers: 15
    Number of nodes: 89,514
    Number of non-identical strings: 48,456
    Total memory used by nodes: 23,141,343
    	Nodes and ResourceInfo: 8,586,108
    	Strings: 3,584,724
    	Markers: 0
    	Sync info: 1,447,861
    	Session properties: 9,522,650
    		class [B: 2,618,076
    		class [Ljava.lang.Object;: 2,564,448
    		class org.eclipse.core.internal.utils.ObjectMap: 1,700,240
    		class [C: 1,454,994
    		class java.lang.Long: 610,800
    		class java.lang.String: 286,580
    		class org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo: 285,292
    		class java.util.ArrayList: 768
    		class org.eclipse.team.internal.ccvs.core.util.StringMatcher: 660
    		class org.eclipse.team.internal.ccvs.core.util.FileNameMatcher: 320
    		class [Ljava.lang.String;: 300
    		class org.eclipse.core.runtime.QualifiedName: 160
    		class java.lang.Object: 12
    The top 20 equal but non-identical strings are:
    	A.java->2,002
    	in->1,219
    	plugin.xml->913
    	out->794
    	A_out.java->489
    	A_in.java->487
    	eclipse->431
    	org->421
    	Test.java->412
    	B.java->345
    	build.properties->297
    	I.java->269
    	internal->256
    	about.html->253
    	plugin.properties->243
    	.cvsignore->227
    	.classpath->209
    	ui->185
    	src->184
    	package.html->165

### CVS Merge memory usage

Merging in CVS makes use of the Core synchronizer. Perform the following steps with the Core Spy Tool installed to ensure proper memory management.

1. Checkout one or more projects
2. Open the Element Tree Spy to get the memory footprint.
3. Perform a merge
4. Open the Element Tree Spy to get the memory footprint. The only increase should be in the synchronizer.
5. Remove the merge from the sync view
6. The Element Tree Spy memory footprint should be reduced accordingly