You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@excalibur.apache.org by fi...@cirquedigital.com on 2005/03/21 07:50:03 UTC
[fortress] performance observation
AbstractContainer.verifyComponents
Hi,
I'm playing around a bit with my profiler and I stumbled across
something interesting:
AbstractContainer.verifyComponents() seems to take a long
time, and it's caused by the following line (around line 714):
Map deps = (Map) m_mapper.get( dit.next() );
....
if ( null == deps ) continue;
Iterator mdit = deps.entrySet().iterator();
while ( mdit.hasNext() ) <--- this is the culprit
Map.Entry depEntry = (Map.Entry) mdit.next();
The cumulative time in a system with a couple 100 components
for just the mdit.hasNext() line is > 5 seconds (1851 calls).
Anybody any thoughts on why this may be ? Guessing it
has to do with the fact that it's an entry set iterator
and not a key set iterator ?
Any suggestions? I'm guessing that just flattening the
Map into an array may work in this case...
Thanks for any thoughts,
- Filip
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@excalibur.apache.org
For additional commands, e-mail: dev-help@excalibur.apache.org