Hi there!
I have developed an application in WPF that shows some layers (with shapefiles and KML files, local storage).
It takes a while (many seconds) to move around the map and doing zoom inside it.
Is this an isolated problem with me or is there anyone “suffering” this same problem?
I can provide any technical detail if you want, but I’m afraid of this!
Thank you so much,
Tomás.
Slow performance
Hi Tomás,
Thanks for your post and welcome to Map Suite world!
Sorry that we were unable to reproduce your issue on our
end, it’s hard for us to determine the problem based on your description. Can
you provide us more information like below?
- What’s about our HowDoISimple works in your
environment? Do they also get the same performance issue? - What’s version you are using on our Wpf Desktop?
- A “self-contained” sample will be highly
appreciated if it is possible. It’s bigger than the allowed file in forum, you
can send it to forumsupport@thinkgeo.com
Look forward to your further information.
Thanks,
Johnny
Hi Johnny:
First of all, thank you for your answer.
I am using v6.X of your WPF Desktop libraries.
The “HowDoI” samples that you were talking about run more or less good, but they are slower than other engines, and I don’t know how to speed up this.
My question is: what factors can make me improve the performance in my map application?
Currently I have several layers that are being rendered in the map (each one in a specified zoomlevel): two of them from a KML and the others from shapefiles.
Maybe you can help me answering this questions:
- If I transform those KML layers into shapefiles, will be the performance better? How much? Is it quantifiable?
- If I change your shapefiles by another shapefiles with a lower quality, will be the performance better? How much? Is it quantifiable? I am using mainly “Countries.shp” and “WorldCoastline.shp”.
- What about merging several shapefiles into another? I mean, having only one shapefile instead of N. Will be the performance better? How much? Is it quantifiable?
- In terms of performance, which is the optimum format for loading a layer? Would it be worth changing it?
- Do you think upgrading the libraries will improve my application performance?
Thank you so much,
Tomás.
Hi Tomas
About the first question, we have tested a shp file(more than 300M and lineshape) and a kml file which is converted from the shp file to make sure they have same shapes, the result is that the shp file only uses about 1/3 time than the kml does, so it is better to convert kml file into shape file.
About "lower Quality", it should be faster if using lower quality, but the exact quantity of saving time shoud depends on how low the quality can be.
About the third question, we merged three shape files(all are about 190M and lineshape) into one shape file, and the result is that the MergedShape file uses only about 1/2 time than the seperated three shape files. so, it is better to merge shapefiles into one.
About the fourth question, it should be worth to change kml to shp, and merge shp files into one based on our test data.
About the fifth question, upgrading the libraries will always bring performance improvement in certain fields, if the application is related to one of the fields, then the performance should be elevated.
if you have any more question, please feel free to let us know.
Hope it helps
Summer
Thanks for your answer.
I have more questions:
I developed a little small program that has a map, and inside that map there is a layer containing the countries shapefile (3MB). Only that.
I expected to see a big performance with this program, but when I do any movement in the map trying to show another zone or even doing zoom it takes near 2 sec to show that zone. That could be ok. No problem with that. The problem is that in the same computer, I open Google Chrome, go to Google Maps and then I do the same test and… Google Maps (online, with a web browser not optimized for this purposes…) it goes super-fast! (I mean, faster than my WPF application)
How could this be possible?
Thank you so much,
Tomás
Hi Tomas,
Thanks for reporting this, and the reason for chrome being superfast is that the google web map is cached, after clearing the cache of chrome, then visiting google map will be slower.And actually, MapSuite could also provide similar function with following code:
ShapeFileFeatureLayer shpLayer = new ShapeFileFeatureLayer(@"c:\testdata\countries02.shp");
shpLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
shpLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1;
LayerOverlay overlay = new LayerOverlay();
overlay.TileCache = new FileBitmapTileCache(@"c:\temp\countries02");
overlay.TileCache.CacheId = "countries02";
overlay.Layers.Add(shpLayer);
Actually, tileCache is a often used method to speed drawing process up. if you have any more question , please feel free to let us know.
Hope it helps
Summer
Hi Summer:
I agree with you with the FileBitmapTileCache. This will improve my speedup. But the first time the program is run it will be the same as before.
I want to have in my application the feeling that is not “hitching”. Currently, when I move the map it stalls and then shows up the map. I want to be showing the map all the time while I’m moving the mouse.
How can I do this?
I’ve tried to do it caching in memory with InMemoryBitmapTileCache but I could not do it. Where can I see a concrete, complete working example of this kind of cache?
Also I have another question: what about the tinygeo file format? Should it be the best vector format in terms of speed performance?
Thanks for your answers,
Tomás.
Hi Tomas,
Thanks for yoru input,
About "InMemoryBitmapTileCache Sample", would you please check this thread : thinkgeo.com/forums/MapSuite/tabid/143/aft/9755/Default.aspx?
About "tinygeo", we tested a 25m lineshape file, the result is that the shapefile is 30percent faster than tinygeo, but tinygeo has smaller files size. For now to draw with shape file should be faster.
if you have any more question , please feel free to let us know.
Best Regards
Summer