openlayers icon indicating copy to clipboard operation
openlayers copied to clipboard

Slow Zoom In

Open sbowler opened this issue 10 years ago • 4 comments

Unfortunately, I don't have much time to look into this now, but I thought I'd bring this to your guys attention and check with you on it.

I set up a Nodejs server to serve mbtile files using mbtiles and tile-live modules. I set up your latest OL3 version to handle them using Vector tiles. For the most part I think everything was working fine.

The biggest issue seemed to be that there was a large lag every time I zoomed in. I think Firefox may have been the worst, but If I remember correctly all browsers had this problem. What I thought was odd is that panning and zooming out was very fast. The issue was only when zooming in.

I was only using 10m state data from Natural Earth converted to mbtile using Mapbox Studio Classic. Any thoughts or ideas?

sbowler avatar Feb 23 '16 23:02 sbowler

This is a known issue. The planned fix is to only update points and texts during animations, and reuse already rendered images for fills and strokes.

The reason why panning is fast is because already rendered images are reused already. The reason why zooming out is a bit faster than zooming in is that rendering to a smaller image (zoomed out means less pixels per tile) is a bit faster.

ahocevar avatar Feb 23 '16 23:02 ahocevar

Oh, thanks for the quick response. I thought it was also odd your example using Mapbox vector tiles from Mapbox seemed to be faster even though the dataset appeared more complex.

Is there a planned release for this change? Maybe by 3.15? I'd really like to stop using regular vector layers with geojson tiles.

sbowler avatar Feb 23 '16 23:02 sbowler

It will more likely be in release 3.16 or 3.17.

ahocevar avatar Feb 24 '16 07:02 ahocevar

See #5177, which implements the change I talked about in https://github.com/openlayers/ol3/issues/4897#issuecomment-187969697.

ahocevar avatar Apr 06 '16 06:04 ahocevar