ThinkGeo.com    |     Documentation    |     Premium Support

Caching, Multi-Threading, and Panning

Hi,


I am evaluating your Desktop solution and am curious about how if the Desktop Edition utilizes its caching capability. Could you offer some additional information on how or if this caching ability increases performance?


I see there is a multi-threading capability but in reading some other posts see that it was disabled. When will this feature return and what performance or functional advantages should I see in the map when it is enabled?


Will this allow for the continuous map rendering when panning? Is there an existing feature that I could enable continuous panning?


I am also seeing the CPU on my machine jump to about 30% when moving the map (panning) before releasing the mouse button. Is this normal?


 



Steve, 
  
 You can enable the caching by setting the ClientCache.CacheDirectory property to a proper cache folder. The caching increases a lot of performance especially on panning and Zooming in / out. The Map Control generates the map image by tile and saves the tiled images on disk if the cache is enabled. Whenever the map control refreshes the map, it will first look for the tiles in cache and if it exists, it will load and draw the cached tiles directly on map. 
  
 As there are some multi-threading related issues, we disable the multi threading (we disabled the continuous panning as a result) by default in the current version (3.0.199). We have made a lot of enhancements including adding the multithreading back in the upcoming version which will be released pretty soon; I think this version will provide you a much better experience.  
  
 About CPU is still busy when panning the map, I think it’s normal as that happens also when moving a windows form. 
  
 Thanks, 
 ThinkGeo Support 


Steve, 
  
   I wanted to let you know what is coming with the release candidate for the Desktop Edition.  It has been a long time since the last release and what we decided from then was what we were offering just wasn’t good enough to be the best.  We took a fresh look at all the technologies and techniques at our disposal and came up with some great ways to enhance the system, lower CPU utilization, and give the map a great feel. 
  
   We enabled the multi threading again and have test it with a large number of scenarios.  We have done what we can to keep you thread safe by default however if you inherit from the control or keep instance without using our properties then you need to protect yourself.  To facilitate this we have a SyncRoot property that we suggest you lock on whenever you are going to manipulate the map.  As I said if you use properties or methods then we handle this.  We also have an option to turn it off as well. 
  
   The entire panning, zooming and drawing system was replaced with a threaded tiled system.  Regardless of if you use caching we will cache tiles internally in a sort of temporary caching system.  This means moving back over areas you have previously draw is lightning fast, think Google maps.  The entire goal of the tiled system was to do all the heavy drawing on other threads and to always have the main UI thread responsive no matter what.   The caching is by overlay so we allow you to invalidate a single overlay.  This is useful when only certain layers change.  Now that we have this default level caching we needed to allow you to signal us that either one of two things happened.  The first is that you changed the extent like panning, zooming etc.  For this we still use Map.Refresh.  When you call this we keep the current caches we will just update the position.  If for some reason your styles changed or you manipulated the data of a overlay then you can invalidate our cache using the Map.Redraw(Overlay) method.  This lets us know we can abandon the cache because it is no longer valid.  You can do this as often as you want as getting rid of caches is something we expect will happen quite frequently for certain overlays. 
  
   We talked with a number of customers and based on feedback enhanced our editing system.  We now have an easily extensible system that will allow us to meet any advanced editing requirements.  We have also enhanced the look and feel of editing.  We added the functionality to delete and add vertexes anywhere on a line instead of just the center.  As part of the editing system overhaul we came up with the idea of IntereactiveOverlays.  These classes are overlays all respects however they can also respond to system events like mouse click, double click, mouse move, etc.  We have implemented all of our interactions on this model.  For example editing, panning, track zooming, mouse wheel, track shape drawing etc are all now interactive overlays.  You can enhance our current ones or build your own to get any kind of interactive effect you require.   
    
   If you can hold out another week then you can checkout the new and vastly improved Desktop Edition.  I think you will be very satisfied with the enhancements. 
  
 David

Are we getting closer to the new release?

Alan, 
  
 We are busy on preparing the release and doing some more tests on the multi-threading stuff, I think probably we will release it early next week. 
  
 ThinkGeo Support  


Alan, 
  
   It will be out the day after Memorial Day (May 26).   
  
 Note: Anyone asking if that is 2009 or 2010 will be banned from the forums forever. :-) 
  
 David