This project is read-only.

High CPU usage in getting tiles!

Jun 7, 2009 at 8:18 AM
Edited Jun 7, 2009 at 8:21 AM

Hi,

I noticed that when the program try to use GetTileLayers method to bring new tiles from the generated uri in a specific tilesource class, the cpu usage goes so high ( more than 70 percent in my PC ) and as a result the other functionalities of the program become slow or suspended or even in some cases the whole functionality of the browser (IE, Firefox, Google Chrome, no different) stop working but after a while when the whole tiles was received, the cpu useage gets back to normal.  Now my problem is that when for some reasons (for example sudden failing of internet connection) the GetTileLayer fails to bring some tiles from the givven uri, the cpu usage never comes down, actually the GetTileLayers method never invalidate any uri and try it permanently.

Please let me now if there is any way to prevent such failing and continuing to use the program normallly without bringing those inaccessible tiles.

Thanks for your unique and useful mapcontroler.

Jun 8, 2009 at 1:06 AM

It is an issue with the underlying MultiScaleImage (DeepZoom) control in that it will continue to poll a tile URI until it gets a tile image.

We should file a bug with Microsoft, has anyone seen if this is still the case with Silverlight3?

Our solution (work around) is to request all our tiles through an ASP.NET generic handler (TileHandler). This allows us to do several things:

  1. Set cache time to 7 days
  2. Store our tiles in many different locations (File system / SQL Server) but access from one location
  3. Pass back a completely transparent tile (with expiry set to immediately expire on error) for missing tiles
  4. Allow us to change the way/place we store them later

We also took advantage of setting up 4 domains to point to the same handler so the application could request 8 tiles at once rather then 2 in IE6/7.

FYI, I will be posting our tilehandler open source to this project later this month, first up are the UI controls.

John.