Hi Geoff, Thanks for the bug report and the patch. I've created a Jira issue with your patch attached:
https://jira.codehaus.org/browse/GEOT-4336 I'm afraid it's hard to say when this will be looked at. Andrea, who maintains the shapefile module, is one of the most over-worked developers on both GeoTools and GeoServer. However, it will have more chance of being reviewed sooner if you can extend the patch to: - take care of the params map - include one or more unit tests (if possible, though it might not be obvious how to test in this case) cheers Michael On 30 November 2012 18:17, Geoff Williams <[email protected]> wrote: > > Hi List, > > I think I've found a bug in the logic of the ShapeFileDataStoreFactory class. > > In the createNewDataStore() method, I've noticed that the createIndex > variable is used to actually control whether the index is used. When > enabled, indexes are always (re)created. Here's the relevant code: > > if (createIndex) { > store = new IndexedShapefileDataStore(url, namespace, > useMemoryMappedBuffer, cacheMemoryMaps, true, > IndexType.QIX, dbfCharset); > } else { > store = new ShapefileDataStore(url, namespace, > useMemoryMappedBuffer, cacheMemoryMaps, dbfCharset); > } > > I've been using GeoTools 8.3 as part of geoserver 2.2.1 to deliver WFS data > from shapefiles. I found that under load (generated with jmeter) , the > GeoTools check to see if the index was up-to-date was causing my test system > to grind to a halt so I disabled index creation/updating in geoserver only to > find out that doing so completely disabled the use of the index. > > I think the above block of code should be changed to introduce a separate new > variable to enable use of the index and the createIndex variable should be > passed in the place of the hardcoded 'true' argument. > > I developed a patch against GeoTools 8.3 to enable indexes for local files. > I haven't included support for setting the new variable in the params Map but > I'd be happy to code this up and make any changes necessary to get this to > work with GeoTools 8.4 - any interest? > > I'd really like to get this fix into GeoTools if possible - for performance > reasons, I need to have index updating off but I still need to be able to use > the indexes (which I create offline). > > Thanks, > Geoff > > ------------------------------------------------------------------------------ > Keep yourself connected to Go Parallel: > TUNE You got it built. Now make it sing. Tune shows you how. > http://goparallel.sourceforge.net > _______________________________________________ > GeoTools-GT2-Users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > ------------------------------------------------------------------------------ Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net _______________________________________________ GeoTools-GT2-Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
