Oracle SDO class quite inefficient
----------------------------------
Key: GEOT-1090
URL: http://jira.codehaus.org/browse/GEOT-1090
Project: GeoTools
Issue Type: Improvement
Components: data oraclespatial
Affects Versions: 2.3.0, 2.2.2
Reporter: Andrea Aime
Assigned To: Marc Risney
Fix For: 2.2.3, 2.3.1, 2.4.0, 2.3.M0
Wondering why Oracle data store was so much slower than others, I profiled it a
little.
Turned out most of the time require to render a map is spent in the SDO class
parsing Oracle geometries into JST geometries by over-using coordinate
sequences.
Here is the profile:
com.vividsolutions.jts.geom.CoordinateList.add(Coordinate, boolean)
4.156 100 %
com.vividsolutions.jts.geom.CoordinateList.add(Coordinate[],
boolean, boolean)
com.vividsolutions.jts.geom.CoordinateList.add(Coordinate[], boolean)
com.vividsolutions.jts.geom.CoordinateList.<init>(Coordinate[])
org.geotools.data.oracle.sdo.Coordinates.subList(CoordinateSequenceFactory,
CoordinateSequence, int, int)
org.geotools.data.oracle.sdo.SDO.subList(CoordinateSequenceFactory,
CoordinateSequence, int, int)
org.geotools.data.oracle.sdo.SDO.subList(CoordinateSequenceFactory,
CoordinateSequence, int, int[], int)
org.geotools.data.oracle.sdo.SDO.createLinearRing(GeometryFactory, int, int,
int[], int, CoordinateSequence)
org.geotools.data.oracle.sdo.SDO.createPolygon(GeometryFactory, int, int,
int[], int, CoordinateSequence)
org.geotools.data.oracle.sdo.SDO.createMultiPolygon(GeometryFactory, int, int,
int[], int, CoordinateSequence, int)
org.geotools.data.oracle.sdo.SDO.create(GeometryFactory, int, int,
int[], int, CoordinateSequence, int)
org.geotools.data.oracle.sdo.SDO.create(GeometryFactory, int,
int, double[], int[], double[])
given that the whole process takes 7 seconds and requires Oracle communication
and rendering as well, improving this would mean doubling the Geoserver
performance when using the Oracle data store. As a recipe I would suggest to
keep data in simple double[] as long as possible, and turn them into
CoordinateSequences only as the last step.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel