[geotk] [JIRA] Created: (GEOTK-61) CRS.lookupIdentifier(...) is
sometime slower than it should be and can lose connection
Martin Desruisseaux (JIRA)
jira at geomatys.com
Wed Nov 11 05:46:37 EST 2009
CRS.lookupIdentifier(...) is sometime slower than it should be and can lose connection
--------------------------------------------------------------------------------------
Key: GEOTK-61
URL: http://jira.geotoolkit.org/browse/GEOTK-61
Project: Geotoolkit
Issue Type: Bug
Components: Referencing
Affects Versions: 3.05
Reporter: Martin Desruisseaux
Assignee: Martin Desruisseaux
Priority: Minor
Fix For: 3.06
The {{CRS.lookupIdentifier(...)}} convenience method is slower than it should be, especially when there is no CRS from the database matching the given one, for the following raisons:
* {{CachingAuthorityFactory}} remembers (as expected) the result of previous successful searchs, but do not record which searchs failed. Consequently code that lookup often for the same CRS seem to work normally when the CRS exists in the database, but become very slow if the CRS does not exist.
* When {{DirectEpsgFactory}} fails to find the identifier of a dependency (for example the {{Datum}} used by a {{GeographicCRS}}) using the database indexes, it conservatively scans every {{Datum}} objects. This conservative approach is too aggressive.
In addition, {{IdentifiedObjectFinder}} performs its work outside the "_acquire factory_, _use_, _release_" cycle of {{ThreadedAuthorityFactory}}. It works but offer no protection against the automatic disposal of factories after a timeout, which may result in a "_Connection closed_" error message in the middle of lookup if that process was too long. This is more manifest during debugging because of the pause between steps. To prevent that, the work of {{IdentifiedObjectFinder}} should be put inside the usual "_acquire_, _use_, _release_" cycle.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.geotoolkit.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the Geotoolkit
mailing list