excalibur-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <cziege...@apache.org>
Subject Re: Optimizing SourceResolver.release()
Date Sun, 31 Jul 2005 15:44:13 GMT
Sylvain Wallez schrieb:

> 
> Well, it's difficult to do something better than a few hashmap puts and 
> gets, and possibly crawl up the service manager hierarchy. All this to 
> end up calling an empty method...
> 
What about caching the source factories in the source resolver
implementation?
During runtime a service manager and selector do never change, so once
the source resolver has looked up a factory, it can put it into a map.
On releasing a source, there is then just one single lookup into a map
that might contain 8 or 10 different source factories.
So this way we have only one single lookup into a small map while we
have an instanceof test with your solution. Actually I would like to go
the caching way as this just improves the performance without adding
interfaces that are just there because of possible performance issues.

As Leo and Peter have suggested, did you do any performance tests so we
can see what these changes actually bring?

Carsten



-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@excalibur.apache.org
For additional commands, e-mail: dev-help@excalibur.apache.org


Mime
View raw message