ThinkGeo.com    |     Blog    |     Wiki    |     Support

Multiple concurrent calls to Tiles Server to improve user experience

We’re having ThinkGeo based, map application requesting tiles from tile server (OSM mod_tile based tile server). There is a problem with user experience, actions on map are shown with a delay.

We’ve identified, that map component opens only 2 connections to web server serving tiles. Tiles are downloaded one by one within particular connection. In Apache web server logs there are requests for tiles appearing slowly one by one.

With this same tile server and other clients (i.e. QGIS, OpenLayers) performance and user experience are much better, but those clients open multiple concurrent connections and are downloading multiple tiles simultaneously.

Server can handle up to couple of hundreds concurrent connections. Tiles for levels 0-18 are pre rendered and available in cache (very fast disks), hence there is no performance issue on server side.

Can you please advise how to enable multiple concurrent calls for single map component?

Hi Piotr,

Could you please provide us more detail information about that? For example a server we can test, and what’s the layer you are using, a test sample with your custom code should be helpful.

We checked the logic for some layers for example OpenStreetMapOverlay, and hadn’t found the thread limitation in it. Our developer just fixed a bug in other product about the thread problem, it looks we open all threads nearly at the same time, just wait all threads complete for a tile we will draw it.

I did a quickly test, it looks the client side send about 15 request nearly the same time, because the tile number is about 15 here:

Regards,

Ethan

The problem has been solved by adding to code: ServicePointManager.DefaultConnectionLimit = 20
We can close this issue. BTW there is another one - quick change of zoom level - for example from 11 to 13 level complete tiles for level 12 also.

Hi Piotr,

Thanks for your share about that, I think that’s helpful if other user who met the same problem.

And we can cancel the tile image request before it sent url, but if it had sent the request in thread we cannot cancel that, but we won’t draw it. If you want to avoid that, you should want to directly set the correct extent corss two levels, or use our other API implement that.

Regards,

Ethan