I have turned on disk cache,my db3 file is about 1GB and the map operation is very slow. There is a delay of 3 to 4 seconds when dragging the map. I found that the redraw time was about 0.016 seconds when the map window was small, but 0.47 seconds when it was displayed in full screen, and the operation was significantly delayed.Has anyone had a similar problem？
Hello @uav, and welcome.
It’s hard to say without more detail. Regardless of the window size, a lot depends on what you are trying to display within that window. The map will only render those features that are within the current map extent, and you can also control the minimum zoom level that features are displayed, so that if you’re zoomed out to full extent, it’s not trying to draw all features of all layers.
Please provide more detail regarding the map layers and features, and perhaps your drawing code, if you still need more direction.
Same map extent, the redrawing time is 0.015s when the window is small, and 0.047s when the window size is large.
I found the same problem with MapWindow. The redraw time will increase when displayed in full screen.The refresh rate of the computer screen is usually set to 60 Hz, so the map should take 1/60=0.016 seconds to redraw. I don’t know why the map will be slower in full screen .
Ok. I can certainly try to reproduce this, but looking at it, if all you are drawing is the tiling, then it seems like a tiling issue. If you turn off the tiling, is the redraw time is close to identical? I guess it would be since you are then not drawing anything.
I had thought from the description that the rendering of map features was changing dramatically based on window size.
I’ll try some things and get back to you.
Additional info: Make sure you are using the most recent OCX (5.2.4), which includes load optimizations (check out ticket MWGIS-207).
And have you tried adjusting the TilesThreadPoolSize?
No, I’ve never adjusted the tilesThreadPoolSize
Looking back, I’m not certain that the tiling refresh is your issue. You will only see the map redraw time (up in the corner) when you are drawing data. If you were only drawing tiles, there would be no display in the corner.
Additionally, I see that although you are redrawing in various sizes, you are always refreshing the entire extent, so presumably all of your features (however many there may be) are being drawn in both of your cases. You have speculated that the issue is related to the size of the disk cache. So I may have to create a test case that is similar to yours.
I should note that the redraw time in the corner is based on the time it takes to fully execute the drawing code. It has nothing to do with the refresh rate of the monitor.
Any additional information you can give me, such as any testing you may have done with different caching settings, would be helpful. Otherwise, I will just try to reproduce the issue and see if it falls through different code paths that affect the timing.
I am using the local SQLite cache data which can support 2T data, but now 1GB data is very slow. It makes no sense if the map operation becomes more and more sluggish as the amount of data increases
I want to make sure I understand what you’re saying.
I would agree that it should not make sense for the map to become sluggish as the amount of data increases in the cache (presuming the indexing is sufficient), but it does make sense for the map redraw to slow down as the amount of data you have to draw increases. So if you are displaying the whole world, and you have no filtering or minimum visibility levels set, then you are always drawing all of your data.
Having said that, if in both of your examples, you are drawing the same number of features, then I would expect it to take about the same amount of time UNLESS when your window is smaller, the features become less than 1 pixel in size and are therefore not drawn.
If you were to zoom in to your features (rather than the whole world) and compare redraw speed in the smaller window vs the maximized window, and see what the difference is, that would be good to know.
Ok, so here’s an example using the USA map, which includes States, Counties, Cities, Roads, Lakes and Rivers (6000+ features). If I remove tiles, add disk caching, shrink down the window, and click the “Zoom to Maximum Extents” button, it is taking about 0.125 seconds.
However, if I then maximize the window, and again zoom to maximum extents, it’s drawing the same number of features, but it is taking about twice as long (0.265 seconds). So this is perhaps what you’re talking about, and with this example, I can try to figure out why it is taking longer.
Here’s the small window:
And here’s the top right of the maximized window (showing the redraw time):