moagrius/MapView — pull request #50 by mohlendo (2013-05-16 08:16:48+00:00)
Title: Parallel decoding

While using the HTTP based tile decoder I had a lot of performance issues with the rendering of the tiles. The current implementation does the decoding of the tiles in one background thread and when all tiles have been decoded, the tiles are rendered on the UI thread.
This means that you have to wait for all tiles to load, which might take some time when using HTTP, until they are rendered. In this pull request I have introduced another way of decoding the tiles. There is still one background thread that is started for the list of tiles, but this background thread starts new threads for every tile and downloads/renderes them individually. The enclosing background thread only manages the individual threads and cancels them if needed.
For me this brings a lot of "visual" performance because every tile is now rendered directly after it was decoded and has not wait for the others.