Hello,
I have shapefiles for several different countries and as I load more of the shapefiles that I have, drawing performance starts to significantly decrease, even when I'm zoomed into an area where few shapefiles should actually be drawn.
For example, if I load shapefiles in the US, it takes between 3 and 5 seconds to draw. If I then load all my shapefiles in Italy, and am still zoomed into a city in the US, drawing time increases to more than 15 seconds.
I have index files created for all of these shapefiles and custom indexes for any shapefiles I am using ValueStyles for.
Just for fun, before asking the map to draw, I added some code to loop through all the layers to see if their bounding boxes overlap the current map extent. If they do, I set their IsVisible to true and if not, I set it to false. I noticed an incredible performance difference. From over 15 seconds to draw to less than 5 seconds.
This seems like something the WinformsMap should be handling itself. Is there something else that I could be doing wrong? Should I be doing this? Is there anything else I can do to help drawing performance?
Any help would be greatly appreciated.
Thanks!