From: equinox-dev-bounces@xxxxxxxxxxx [mailto:equinox-dev-bounces@xxxxxxxxxxx] 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
Tom
-----equinox-dev-bounces@xxxxxxxxxxx wrote: -----
To: "equinox-dev@xxxxxxxxxxx" <equinox-dev@xxxxxxxxxxx>
From: "Ivanov, Radoslav" <radoslav.ivanov@xxxxxxx>
Sent by: equinox-dev-bounces@xxxxxxxxxxx
Date: 01/24/2011 07:14AM
Subject: [equinox-dev] StateHelperImpl.getExportedPackageMap: map/set initial capacity
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?
Map<String, Set<ExportPackageDescription>> result = new HashMap<String, Set<ExportPackageDescription>>(11);
exports = new HashSet<ExportPackageDescription>(1);
IMHO, in most cases, it causes array resizing, which, I saw, reflects to performance analysis.
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev