Bug 335279 was created: https://bugs.eclipse.org/bugs/show_bug.cgi?id=335279
From: [email protected] [mailto:[email protected]] On Behalf Of Thomas Watson Sent: Monday, January 24, 2011 4:43 PM To: Equinox development mailing list Subject: Re: [equinox-dev] StateHelperImpl.getExportedPackageMap: map/set initial capacity Please open a bug and supply a patch with a suggested improvement. Tom [email protected] wrote: ----- To: "[email protected]"<mailto:[email protected]> <[email protected]><mailto:[email protected]> From: "Ivanov, Radoslav" <[email protected]><mailto:[email protected]> Sent by: [email protected]<mailto:[email protected]> Date: 01/24/2011 07:14AM Subject: [equinox-dev] StateHelperImpl.getExportedPackageMap: map/set initial capacity Hello I am writing with regards to method "org.eclipse.osgi.internal.resolver.StateHelperImpl.getExportedPackageMap", which constructs Map and Set with initial capacity. Is there a particular reason for constructing them in that way? For example, Map<String, Set<ExportPackageDescription>> result = new HashMap<String, Set<ExportPackageDescription>>(11); or exports = new HashSet<ExportPackageDescription>(1); IMHO, in most cases, it causes array resizing, which, I saw, reflects to performance analysis. Best regards Radoslav Ivanov _______________________________________________ equinox-dev mailing list [email protected]<mailto:[email protected]> https://dev.eclipse.org/mailman/listinfo/equinox-dev
_______________________________________________ equinox-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/equinox-dev
