Sufficient performance?

I am experiencing perceivable delays on scrubbing the time cursor. e.g. Africa, it takes 1 to 2 secs to update the borders. Is it just my connection or do we have room for improvements in the backend?

Our vector map tiles currently weigh a lot because we’ve just begun to think about performance optimization:

We recently deployed an improvement that drastically reduces the size of tiles that contain many complex geometries, but we haven’t yet implemented a change to reduce redundancy when encoding boundaries that change frequently over time.

Some of the lag you’re experiencing is because of a compatibility shim in our map renderer that is no longer necessary. Removing it would improve the user experience quite a bit, but it’s tricky because the relevant code is tightly bound with code we’ve inherited from OSM:

To be clear: I am not dragging Africa around. The tiles are fully loaded. (Though dragging the entire map is also, well…, not the subject of this thread.)
I am dragging the time slider to observe the borders change over time.

Yes, both the tile size (the sheer amount of redundant data in the tiles) and the Leaflet compatibility shim are responsible for the lag (and high CPU usage) when dragging the time slider around.

We’re have our eye on what we could do to get rid of the shim, but we’re waiting for some upstream development to help us out with that, so we aren’t pre-building a wheel…

That said, I feel your pain. Sometimes I feel like a browser refresh or an adjustment to some of the timeslider settings can burp the shim or speed things up a bit, but that’s likely an anecdotal and self-soothing interpretation of what’s going on. @Minh_Nguyen - any explanations fro my observations, or am I just wishing for what I want?

The issue is basically a race condition as the time slider updates the various layers, causing MapLibre to redraw them headlessly, but sometimes missing Leaflet’s refresh cycle. One of the key advantages of MapLibre is the ability to draw immediately to the screen using hardware acceleration, but we’re foregoing all that by putting Leaflet in front.

We could try to optimize some other things on the client side. For example, we have many mostly redundant layers because the stylesheets are still using the legacy style function syntax instead of the modern (circa 2018) expression syntax. More layers means more work for the time slider every time the date changes.

1 Like

Yes, a layer cleanup is waaaay overdue. Ticket inbound.

This view takes almost 42 secs for loading. Maybe it is a temporary issue?! (Plain OSM loads in less than a second.)

Interesting, it loads in just a second or two for me, but I wonder if that’s because you were the first person to request these particular map tiles since we deployed some changes to the tile generator on the backend. (Among other things, the new tiles contain centroids for better labeling.) Do you continue to see this issue when revisiting the same location?

Today I am back to normal, less than 2 seconds.