Thanks for your reply! However I cannot agree with you. Below are my steps to show that shapefile is being read on each redraw - no cached image at all.
My code sample can be taken from here: http://files.rsdn.ru/90653/ShapeRendererWithTools.java By the way it is an example how to embed JMapPane to JFrame, thus avoiding usage of JMapFrame. Maybe it can help someone. Steps are as following: 1) Download ProcessMonitor from Sysinternals: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx 2) Add Filter: Path contains .shp. Such a filter will only show reads from the shapefile. Press CTRL+X or Press Clear icon of the ProcessMonitor. All logged events will be removed. 3) Correct private String PATH = "D:/data/world.shp" constant at my sample, pointing to your shp file (I tested on small point layer). 4) Compile and launch sample. 5) Please notice a lot of ReadFile events - your shapefile is being read by the code. At the path column of the ProcessMonitor you will see path to your shapefile. 6) Goto ProcessMonitor. Press CTRL+X or Press Clear icon of the ProcessMonitor. All logged events will be removed. 7) Open again sample app, please notice all of read events once again. I think this proves my theory - even simple redraw causes a lot of shapefile read events. Can you please suggest me on direction how to minimize disk usage? Thanks, Sergey On 3/11/2010 4:17 PM, Michael Bedward wrote: >> I profiled JMapPane-based application using Process Monitor from >> SysInternals, and it turns out that it re-reads shapefile everytime when >> redraw is required. >> > Mmm... I don't think so. For redraws where the display area remains > unchanged the pane just blits a cached image. > > If you change either the map area (zooming, panning etc) or the pane > area (resizing) then a new call is made to the renderer. But note > that JMapPane is just a semi-dumb panel that knows how to ask a > renderer to paint on it. The default renderer is StreamingRenderer > but you can pass it any renderer you like that implements the > GTRenderer interface. > > Michael > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Geotools-gt2-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
