Performance issue when rotating the map
Hi @mikes222 , its me again :) I recorded a video of a performance issue when rotating the map, when there are many symbols its really laggy, this used to work on the previous version. Here is the video
I will also open a PR with an extension to this rotation layer that enables the user to recenter the map or lock it
I suggest to use the positionStream instead of the rotationNotifier.
The former comment regards to the PullRequest.
- How many symbols are in the datastore(s) when you rotate?
- What means "previous version"?
- Is the map rotation fast without the symbols?
- i dont know exactly, but I guess a lot in the map itself in the stores around 20
- the version before the refactoring
- yes you also have the map that i am using so maybe you can give it a try, but i tried on both physical and simulator
I have experienced similar issues, but with thousands of markers. I need more time to find the root cause...
I have experienced similar issues, but with thousands of markers. I need more time to find the root cause...
yes, i guess it was thousands for me as well, because its only happening near big cities.. hope you manage to solve it
Improved rotation:
- Switched to rotationHandler which is a faster implementation compared to RotationGestureDetector
- Prevent recalculating tiles while rotating or zooming
Additionally I have implemented a DefaultMarkerClusterDatastore which helps if there are thousands of markers which could be clustered.
Let me know if this solves your problem.
Improved rotation:
- Switched to rotationHandler which is a faster implementation compared to RotationGestureDetector
- Prevent recalculating tiles while rotating or zooming
Additionally I have implemented a DefaultMarkerClusterDatastore which helps if there are thousands of markers which could be clustered.
Let me know if this solves your problem.
sorry for the delayed response, just managed to test it on an actual device. there is significant improvement in the rotation, even tho the map does not feel smooth as the initial version when i started using your library, we are getting there day by day. Thank you for your effort!
@mikes222 there is one more thing that is a bit problematic here is a video of it if you have a marker (path marker, or poimarker) drawn and you start moving the map, the map moves before the markers do, that very visible when you have lots of symbols on the map, do you think thats something that can be fixed?
Unfortunately I have no idea how to synchronize the overlays in the best possible way. Each overlay is now independent of each other and receives its informations at different times. If you have an idea or find a possible architectural pattern feel free to point me in the right direction.
Unfortunately I have no idea how to synchronize the overlays in the best possible way. Each overlay is now independent of each other and receives its informations at different times. If you have an idea or find a possible architectural pattern feel free to point me in the right direction.
@mikes222 i played around trying to figure out someway to resolve it, i updated my PR you can check it maybe you will get an better idea from it, the main problem is the different update sources for tiles and marker datastore, i tried to unite them, but now the markers are blinking on every map movement, otherwise they move with the map :) its almost 12 AM here, so i cant do much more, but if you get an inspiration from my PR feel free to cancel it
hi @mikes222 unfortunately there is one more performance issue, if the map is zoomed out a lot, and you try to move it around while having lots of markers, its very slow, this was working quite smoothly in the previous implementation of the library any update on that topic?
posting a video as well
hi @mikes222 regarding the last issue, i noticed its the LabelView causing it, when the zoom level is really low, it tries to draw thousands of markers, i created a very simple pull request where you can limit when labels are drawn on the map based on the zoom level: PR here