We use the 6.0 Desktop Edition and the World Map Data Kit to display the maps in our application. We have the World Map data kit shapefiles loaded on a server in our offices and we share the map files on that server among the active users for our application. Typically we have less than 10 users of our application at any particular time. I have also run the application with the World Map Kit Data located on the same machine as our application with only a single application using the files.
We have noticed very slow rendering of the map in our application when zooming or panning around the map. I use the WorldMapKitRenderLayer class that was used in the DesktopEdition sample application on the WorldMapKit sample applications to build the layer and overlay of the map. I have made a few minor changes (mostly to capture exceptions) in the class from the original source. I have been looking for optimazation of the code for rendering the map and I have not found much except to eliminate shapefiles. I spent some time looking at the WorldMapKit sample application which has a listview showing the timing of the various shapefiles as you zoom and pan around the map. I have noticed a wide variation of timing from one-half second or less to as much as 20 seconds (rendering Canadians streets zoomed to a very low level). Generally, after I have zoomed to a particular area around the 4th or 5th zoom level, I see a typical pan operation requires approximately 2 seconds. Again using the sample application, I have observed that a majority of the time to render the map is very often used by the "labels" for the shapefiles. I noticed that Labels are loaded as "dynamiclayers" while Symbols are loaded as staticLayers. I am guessing that this is likely to be because the labels are generated only for the extent that will be visible for any particular rendering.
Can you offer any recommendations for optimizing the speed of rendering the map? Would it be possible and worthwhile to "preload" the shapefiles in some sort of background thread? Many of the shapefiles are specific to each state in the US. This does not seem to be easy to preload shapefiles. Do the shapefiles stay "cached" in memory after the first access? If the labels are generated dynamically, would there be any way to generate these in the background or for a larger extent? Do you have any reccomendations on profiling the code to determine if there are any bottlenecks that we might improve on?
Thanks
Richard