This project has moved and is read-only. For the latest updates, please go here.

How to make ArcBruTile faster?

Jan 26, 2010 at 8:18 AM

The performance of retrieving/drawing tiles with ArcBruTile is quite ok, but I think it can be faster. But how, thats the question. Two options for improvement:
1] At the moment, each tile from a remote server (byte[]) is first saved to disk and after that retrieved with IRasterLayer.CreateFromFilePath(file). I think it's faster to perform the conversion to IRasterLayer in memory (if possible). The IRasterLayer is needed for projection, directly write the byte array to graphics device is not an option.
2] The tiles are retrieved in threads, but the drawing of the tiles does not start before all tiles are retrieved (with WaitHandle.WaitAny). It should be faster to draw the tile immediately when it arrives.

Nov 18, 2010 at 8:48 AM

1] Yup, should be faster if you do not write everything to disk. But, you would have to manage the memory better in that case, I think. Memory is more limited than hard drive space.

1a] It could also speed things up a little if you maintain the LastWriteTime in memory instead of creating a FileInfo object for every cached tile at every redraw. 

1b] It is possible (I am not too sure with C#/Windows Threads) that less threads would be better; e.g., only maintain around 5 download/render threads at a time. That would leave Windows less busy with thread handling, and also less busy with handling many downloads at once.

2] Only one way to find out.  :)

Thanks for the good work.