Add MAVLink message metadata#2287
Conversation
|
I haven't tested yet, but from a quick look at the code it seems to be primarily for the MAVLink inspector. Would it be possible/difficult to also add for the MAVLink Actions definitions? That can be left as a later PR if need be (dedicated to addressing #2286) - just not sure how complex it would be. |
I just want to get the metadata in, after that others can add the integration in other components in cockpit, the minimal integration that this PRs delivers is a proof of concept. |
7e71e9b to
cc86a74
Compare
ES-Alexander
left a comment
There was a problem hiding this comment.
I haven't reviewed the code, but did just try it out.
It would be nice if the tooltips were wrapped instead of clipped, but I can understand if you'd prefer that be left to a separate PR (since the point of this one is to get the data in and show that it works) 🤷♂️
It seems to have a pretty significant performance impact, especially when opening the inspector (which also seems to use extra memory every time it opens), as well as adding a bunch of variance to the app framerate - especially when tracking a variable's state:
Was this performance problem there already or is it something new? |
I confirmed it's not in master before posting it. I meant to include "on master it's not even noticeable when you open the pane or track a variable." in my original review comment. |
|
I'm unsure how to apply this, but I believe it should dynamically load the tooltip text on hover, instead of loading the potential tooltips for every possible message when the window opens. If need be we could batch that with pagination for the message list, at the expense of the current nice scrolling experience, but I think it should be fast enough to just fetch them individually as and when needed. I also think it might be currently tying the tooltip too deeply to the tracked messages, which could be causing it to reload something it shouldn't be when new messages are triggered as received/sent, and update the interface with the new values. That said, these are frontend implementation issues (technically unrelated to the inclusion of the MAVLink metadata), so if @patrickelectric doesn't want to fix them then this PR could be left as a draft and used as a reference for one that pulls things in without the performance issues :-) |
cc86a74 to
5992d66
Compare
Or we could merge only the two first commits, that add the metadata and the interface to access them. @patrickelectric if you still want to add the metadata somewhere and this fix ends up getting too much time, a suggestion would be to add the tips to the |
|
Thanks @rafaellehmkuhl but I have problems with performance issues 🤣 |
Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
653a99c to
2bec0a8
Compare
|
@ES-Alexander @rafaellehmkuhl the PR is better and faster now |
ES-Alexander
left a comment
There was a problem hiding this comment.
Took a look:
- Performance definitely improved back to nominal while tracking messages - nice! 💙
- This was the biggest deal, and the only one I would properly consider to be blocking for this PR
- There are still noticeable lag spikes when opening the inspector, and smaller ones when starting or stopping tracking a variable, that are not present in master
- There are also still memory step increases when repeatedly opening the inspector, and smaller ones when repeatedly tracking a variable, which are not visible in master
- These do at least seem somewhat bounded (like, after enough re-opens it just stops increasing)
- But it still seems weird to me that opening the same pane would allocate a bunch of new memory without reusing or cleaning up the old memory (but maybe that's JS/electron's fault?)
…iption of each message Signed-off-by: Patrick José Pereira <[email protected]>
Break reactive item to a component to avoid recreating entire main component Signed-off-by: Patrick José Pereira <[email protected]>
2bec0a8 to
081b5ad
Compare
|
Waiting for @rafaellehmkuhl and/or @ArturoManzoli to merge |
|
@rafaellehmkuhl the tooltips are truncated now, so you can presumably dismiss your requested change review. That said, I agree with you that in principle the text should be wrapped instead, so we should probably raise an Issue for it. I did briefly look into how to do tooltip wrapping and couldn't find a reasonable solution (there was lots of search pollution from other Vue variants, that have custom tooltips), so I'm unclear whether it's a trivial or unexpectedly complex task 🤷♂️ |
|
@ES-Alexander @patrickelectric the wrapping thing is definitely not a blocker. It can be worked out later. Can you just confirm that the points around performance degradation that Eliot raised on his previous comment were fixed? If so we can definitely merge it. |
|



As discussed with @ES-Alexander