IndexedFidReader does not leverage the already read buffer, keeps on moving for
each new fid
--------------------------------------------------------------------------------------------
Key: GEOT-1471
URL: http://jira.codehaus.org/browse/GEOT-1471
Project: GeoTools
Issue Type: Bug
Components: data shapefile
Affects Versions: 2.4-RC0
Reporter: Andrea Aime
Assignee: Jesse Eichar
IndexedFidReader is used while accessing features in rendering operations where
the spatial index is used (the spatial index returns the fids, which are then
feeded into the indexed feature reader to grab the offset afaik).
In any case, goTo(recno) shows prominently in the profiles because it's called
for each new recno, and it blidly forces reload of the buffer contents (12kb)
without checking if the current buffer already contains the required
information.
The patch I'm going to apply keeps track of the buffer first byte offset in the
file, allowing to know if the buffer already contains the wanted record, and if
so, simply adjusts the buffer position to fit.
On a benchmark that reads 10000 features out of a shapefile this single change
almost cuts by 50% the GeoServer response time, so it's a very significant
optimization.
I've assigned it to you so that you can review the patch. I've tested it with
various shapefile, always led to good results.
--
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
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel