Sharpmap TileLayer.GetTile is too slow

Feb 1, 2011 at 1:24 PM



im using the BruTile Provider in SharpMap, and since a recent update, the following code is getting too slow:

When I'm using :

bytes = tileProvider.GetTile(tileInfo);

This is being executed in a workerThread from the Thread pool. All the threads are locked in this line and only after the first one is exececuted, then one by one all the others are unlocked.
In my code there is no lock, so i think is something in BruTile.

Is this the first time that someone says something like that ?

I've testes with OSM, Google Maps and Bing. In all cases the result is the same.

Feb 1, 2011 at 2:51 PM

hi Cofee, 

I am not aware of any change that could cause that problem. 

There is one line which caused performance problems before and this is the proxy of the webRequest in the RequestHelper. Not all machines had the same problem here. Try to disable this line:

webRequest.Proxy = proxy;

If this doesnt help you can inspect the ThreadPool. It has a SetMaxThreads method. If it is set to 1 only one request can be fired at a time. Since the ThreadPool is a static class the MaxThreads could be set from any other place in your code. 

Another cause could be that there are a number of Threads but they are in use by some other place in your code. Is the ThreadPool used anywere else?