Martin Desruisseaux ha scritto: > The search in the cache is performed in a synchronized block as well. It > is not something like looking for a key in a hash map. It is something > more elaborated involving a comparaison of hints, looking for factories > dependencies and check recursively the hints in the dependencies as > well, etc. > > Any chance that Geoserver keep more long-time reference to the factories > it use? It could be helpful for result stability as well...
Well, there is nothing GeoServer specific in the code I'm looking at, it's really GeoTools datastore specific. Feature creation, filter management and similar code areas all ask common factory finder for the specific factory. Most of this code was created in times where there was just one factory, so it does not allow an external one to be provided, one is grabbed from the factory finder on a as needed basis, very often once per read feature -> this is where the contention occurs, 20-40 threads all rendering the same data tend to ask for factories at a very high rate (thousands of times per second, per thread). I've already tried to fix some of these so that common factory finder is accessed once per dataset read instead of per feature, and it helps (example, GEOT-1968), as you may imagine this is a sort of uphill battle since almost all vector code has to be amended in the same or similar way, and thus the idea of trying to solve the problem in a single central place. Anyways, at least for my current work, I only have a few extra places to fix, something I'll do in the next days. Long term developers need to learn that accessing the common factory finder has a high contention cost, and must be done sparingly if we don't want to limit scalability. Cheers Andrea ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel