Op 12-Jan-12 01:36, Yang schreef:
> my code looks up features from a IndexedShapeFileDataStore
>
> basically:
>
> for(Point p : given points ) {
>     dataStore.getFeature(query(p));
> }
>
>
> I can see from "top" command that the RES memory consumption is only 40MB,
> I have about 8GB on the box, and have allocated -Xmx4000M to jvm.
> is there any way I could let geotools load more content into memory,
> so hopefully it would query faster?

you could try to copy all of the shapefile into a DataStore or feature 
store that uses a memory stucture such as eg. a hashtable to create an 
in memory cache of the data, of course this will only work reliably in a 
read-only scenario. it depends on you data if it's worth the tradeoff 
with longer startup time.

btw. don't the "cacheMemoryMaps" and "useMemoryMappedBuffer" options on 
IndexedShapeFileDataStore() do anything?


------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to