Fix performance issues in the Map widget and Mission Planning#1604
Merged
rafaellehmkuhl merged 1 commit intobluerobotics:masterfrom Nov 21, 2025
Merged
Conversation
34f43ef to
3c62703
Compare
This fixed the problem of Vue trying to keep track of changes in deeply nested features of the Map object and others, which was causing severe performance issues.
3c62703 to
1a51ef5
Compare
Member
Author
|
@ArturoManzoli @ES-Alexander this is the actual fix for the performance problems in the maps. I've committed the rebased changes to this old PR as it was the original solution. |
ES-Alexander
approved these changes
Nov 21, 2025
Contributor
ES-Alexander
left a comment
There was a problem hiding this comment.
I tested with SR0_POSITION=50, SIM_GPZ_HZ=50, and SIM_SPEEDUP=2, with ArduSub SITL. Both browser and application were improved.
Definitely makes things more stable, and locks in the frame rate - nice work! :-)
Member
Author
Vamooooooo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch moves the Leaflet map objects in the Map widget and Mission Planning view to use
ShallowRefinstead ofRef, which basically makesVueto stop tracking changes to the attributes of those objects (1st degree or deeply nested), and instead just track reassignments of the objects themselves.This change drastically improves performance on those maps, as can be seen from the screenshots below.
Ref:

ShallowRef:

While with deep
Reftracking the system oscillates with drops to 50% of the intended frame-rate, with the ShallowRef we never oscillated more than 10%.This change also ends up fixing a bunch of erros in the console related to re-binding and losing reference of the map objects.