facebook / Rapid

The OpenStreetMap editor driven by open data, AI, and supercharged features
https://rapideditor.org
ISC License
518 stars 91 forks source link

Zooming and panning can be extremely sluggish (Firefox / Mac) #765

Open mvexel opened 1 year ago

mvexel commented 1 year ago

Description

At certain zoom levels the application loads a lot of data and zooming and panning can become extremely sluggish to the point where the only solution to continue working is emptying the cache. Here's a couple profiler reports:

Initial page load: https://profiler.firefox.com/public/rfr50w8wdy58tcwr5fzpahgcp79rd9vkj1r0cc0/calltree/?globalTrackOrder=0w2&thread=1&v=8

Page load after clearing cache then zooming and panning a bit: https://profiler.firefox.com/public/j6zn1fbwjnz7v4tfqdgj95p8b982szb128atgc8/calltree/?globalTrackOrder=0w2&thread=2&v=8

Version

2.00-alpha.3.3

What browser are you seeing the problem on? What version are you running?

Firefox v109.0

Steps to reproduce

No response

The browser URL at the time you encountered the bug

https://mapwith.ai/rapid-v2-alpha3#background=Bing&datasets=fbRoads,msBuildings&disable_features=boundaries&map=12.64/40.7123/-111.9359&photo_overlay=mapillary

mvexel commented 1 year ago

Here's me trying to pick up where I left off after the previous actions: https://share.firefox.dev/3WsF2Kz

The rest of the ux seems to still respond fine but interaction with the map is not possible.

mvexel commented 1 year ago

Comparable zooming / panning in the same area in iD: https://share.firefox.dev/3QYZ7XM

They start showing map data at much higher zoom (Z16) -- is this something Rapid should also do? What is the rationale for showing map data at much lower zooms?

bhousel commented 1 year ago

What is the rationale for showing map data at much lower zooms?

Mostly just that people have wanted to edit at lower zooms for a while.. We do need to implement some ways of drawing the scene better at low zooms so we don't saturate the GPU with too many details.

mvexel commented 1 year ago

This seems to be correlated with the Mapillary layer. When the Mapillary base layer (images) is active, the rendering is significantly worse than if this layer is not enabled.