visgl / react-map-gl

React friendly API wrapper around MapboxGL JS
http://visgl.github.io/react-map-gl/
Other
7.88k stars 1.35k forks source link

[Bug] Zooming is extremely slow on `5.3.21` #2103

Closed NameFILIP closed 1 year ago

NameFILIP commented 1 year ago

Description

Zooming in/out (using mouse wheel or trackpad) is extremely slow on 5.3.21.

Note: Adding transitionDuration={0} fixes the issue.

Expected Behavior

No response

Steps to Reproduce

  1. Open and zoom: https://codesandbox.io/s/billowing-shape-3ppjyl?file=/src/App.js
  2. Comment/Uncomment transitionDuration={0} and try zooming again.

Environment

Logs

No response

Pessimistress commented 1 year ago

v5 is no longer actively maintained. Performance issue is one of the reasons we moved to v7.

NameFILIP commented 1 year ago

Looks like the issue is caused by adding transition properties to the _onWheel handler https://github.com/visgl/react-map-gl/blob/5.3-release/src/utils/map-controller.js#L402. Would it make sense to remove them to make this version at least useable?