Bug 85577 - Many duplicate strings from bundle manifests
Summary: Many duplicate strings from bundle manifests
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.1 M6   Edit
Assignee: Thomas Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2005-02-16 16:21 EST by John Arthorne CLA
Modified: 2005-03-31 11:15 EST (History)
1 user (show)

See Also:


Attachments
Dump file showing duplicated strings (2.30 KB, text/plain)
2005-02-16 16:25 EST, John Arthorne CLA
no flags Details
Reference graph to "Bundle-symbolicname" (5.13 KB, text/plain)
2005-02-16 17:06 EST, John Arthorne CLA
no flags Details
Another reference graph (1.79 KB, text/plain)
2005-02-16 17:06 EST, John Arthorne CLA
no flags Details
Another reference graph (2.05 KB, text/plain)
2005-02-16 17:07 EST, John Arthorne CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2005-02-16 16:21:48 EST
Build: I20050215-2300

Test case:

1) Open eclipse with a new workspace.
2) Close the welcome perspective and intro view
3) Shutdown
4) Restart
5) Run the garbage collector several times
6) Dump all instances of java.lang.String to a file.

When I do this, I find many strings that appear to come from the plugin
manifests.  I will attach a file with more details.
Comment 1 John Arthorne CLA 2005-02-16 16:25:08 EST
Created attachment 18024 [details]
Dump file showing duplicated strings

The format of this file is as follows.	Each string literal is shown, and then
on the following line it has:

Count: The number of equal but not identical instances of that string
Size: The memory space used by all instances, in bytes
Savings: The number of bytes of memory that would be saved by eliminating all
the duplicates.  There's potential here for about 200 KB of memory to be saved.
Presumably this savings becomes much bigger as the number of bundles grows.
Comment 2 Thomas Watson CLA 2005-02-16 16:42:52 EST
Are you doing anything that would cause all the manifest files to be read?  
I'm surprised by this because we should not be reading the manifest files on 
restart as long as we have a cached state to load from.
Comment 3 John Arthorne CLA 2005-02-16 17:04:59 EST
It was the exact test case described above.  It is the second invocation of the
platform.  I literally didn't even touch the UI when it came up.  I just
immediatley produced a string dump in the profiler. I will attach some reference
graphs from the profiler.
Comment 4 John Arthorne CLA 2005-02-16 17:06:05 EST
Created attachment 18026 [details]
Reference graph to "Bundle-symbolicname"
Comment 5 John Arthorne CLA 2005-02-16 17:06:30 EST
Created attachment 18027 [details]
Another reference graph
Comment 6 John Arthorne CLA 2005-02-16 17:07:05 EST
Created attachment 18028 [details]
Another reference graph

(last one, I promise)
Comment 7 Thomas Watson CLA 2005-02-23 17:24:33 EST
I released a new implementation of Headers which is a much less expensive 
object.  I removed two HashTables and replaced them with two Object arrays.  I 
also instern the keys to prevent duplicate string keys.
Comment 8 Thomas Watson CLA 2005-02-23 17:25:38 EST
The new Headers implementation should help.  Marking bug as FIXED.  Please re-
open if you still find duplicate headers strings.
Comment 9 Jeff McAffer CLA 2005-02-24 00:23:44 EST
but did you find out why the headers are loaded at all?  on second run there 
should not be any headers?  I belive John mentioned something about Help or 
About but that should not be at play here.
Comment 10 John Arthorne CLA 2005-02-24 10:22:43 EST
I have entered bug 86476 to investigate why Headers are being created after the
first session.
Comment 11 Tod Creasey CLA 2005-03-31 11:15:55 EST
Thomas can you give me some stats that I can post on our performance page please
(i.e. percent space or time improvements)?