pigeon-maps icon indicating copy to clipboard operation
pigeon-maps copied to clipboard

Fullscreen map interaction is not very smooth

Open zdila opened this issue 5 years ago • 1 comments

This is continuation of #68 for improving map interaction smoothness.

I am comparing with Leaflet which is smooth in both FF and Chrome.

Further observations:

  • Chrome profiler has shown that calling setState twice in row takes couple of milliseconds. I have merged it in https://github.com/FreemapSlovakia/freemap-v3-react/commit/4d80cd62566fcc6b6c1dc63cd85a854ed4ef63a2 but it doesn't fix the problem overall (just profiler looks better ;-))
  • If I enable 6x CPU throttling in Chrome then map panning is a pain
  • With no throttling pigeon maps are almost as smooth as Leaflet in Chrome, but not in Firefox where you can feel the jagging when zooming

It is not a "disaster" but still using Leaflet maps gives better feeling.

zdila avatar Dec 05 '19 19:12 zdila

If I enable 6x CPU throttling in Chrome then map panning is a pain

Actually if throttled then pannign is super-choppy only when dragging with mouse. If I give the map some movement and release the mouse then panning by interia is smooth. This could be caused by calling getBoundingClientRect very often which I found reported to be slow in Chrome (but maybe it has been fixed already).

zdila avatar Dec 05 '19 19:12 zdila