-
-
Notifications
You must be signed in to change notification settings - Fork 893
Description
What is the bug?
"Most" of the time, dragging the map with my mouse in Windows results in less-than-optimal panning smoothness.
HOWEVER, map FLING is perfectly smooth. So is programmatically moving.
So it seems to be tied to something listening or reacting to mouse pointer events. I have commented out any auxiliary code of that type from my own code, no change.
How can we reproduce it?
Not sure what aspect is causing this, but I have tilelayer widgets with and without debounce (just in case that is related).
But just build a windows version and see if fling is noticeably smoother than constant drag.
Most noticeable when panning for a long distance. I have a large/wide screen, so make your map window size at least 1920 wide.
Do you have a potential solution?
Assuming the jittery map pan is due to excessive CPU usage, I performed two tests.
- Panning for about 40 seconds via constant FLING back and forth.
- Panning for a little longer while holding down the mouse and moving around.
I am attaching a cpu recording, sorted by Self Time. The two tests are clearly marked.
As you can see in the jittery test, several flutter_map items are clustered toward the top.
Note: I had data updates turned off (a few tiles probably downloaded here and there), and I had overlays off as well.
Perhaps there are unnecessary setStates occurring after the pointer down event and before releasing? Again, fling is very smooth for the same map "movement". Hope that helps.
Platforms
Windows 11
Severity
Obtrusive: Prevents normal functioning but causes no errors in the console

