Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very poor performance when moderately large missions are loaded #12236

Open
rubenp02 opened this issue Dec 19, 2024 · 13 comments
Open

Very poor performance when moderately large missions are loaded #12236

rubenp02 opened this issue Dec 19, 2024 · 13 comments
Assignees

Comments

@rubenp02
Copy link
Contributor

rubenp02 commented Dec 19, 2024

Current Behavior

When working with moderately large missions (of maybe around 250+ simple waypoints, probably more than the typical use case but still much less than what is currently supported in the main autopilot firmwares), QGroundControl becomes very unresponsive to the point of being unusable, particularly in the Plan View and in low end devices such as Android GCS. In the latter case it can and does crash at any moment, making it unsuitable for operations where the GCS is critical.

Expected Behavior

Adequate performance and stability, at least up to 600 waypoints, which is what ArduPilot supports without an external SD card. Or at the very least the performance of the current QGC stable, where this issue isn't nearly as bad. The model size of even a huge mission is very manageable by any system, so this seems to be due to very innefficient rendering or unnecessary view updates.

Steps to Reproduce:

  1. Create and load a mission with a large number of simple waypoints
  2. Pan the view, scroll down the waypoint list, etc.
  3. The performance will be abysmal at this point. If using an Android GCS, the app will crash within a few minutes.

System Information

  • QGC Version: current master

Sample mission

test-250-simple-wp-mission.zip

@HTRamsey
Copy link
Collaborator

Are you able to run the QML Profiler? If not I will do so at some point. I'm not really aware of anything that's changed with any of the mission/plan view stuff so I'll have to look into it further

@rubenp02
Copy link
Contributor Author

I was going to do it and try and fix the issue but I don't have much time at the moment, so I figured I'd just report the issue. I'll do it later if I can

@HTRamsey
Copy link
Collaborator

HTRamsey commented Dec 20, 2024

Haven't tried on Android yet but at least on a high end Linux it works fine. It looks like it is likely MissionItemEditor that is causing the problem though
image

@rubenp02
Copy link
Contributor Author

Maybe is something Windows/Android related, then? I haven't done any profiling but the issue is immediately obvious when compared to the latest stable.

@DonLakeFlyer
Copy link
Contributor

DonLakeFlyer commented Dec 22, 2024

Unless there is some specific control that has gone whacky there isn't much different in the Plan view Stable -> Daily.

@DonLakeFlyer DonLakeFlyer self-assigned this Dec 22, 2024
@DonLakeFlyer
Copy link
Contributor

Tried OSX, don't see anything out of the ordinary

@DonLakeFlyer
Copy link
Contributor

Windows is working fine for me as well with the example plan from above

@DonLakeFlyer
Copy link
Contributor

Herelink seems fine as well. Scrolling the waypoint list up/down is a little sluggish but still workable.

@rubenp02
Copy link
Contributor Author

Seems like it might be an issue on my end... I'll see if I can find out the reason this week

@DonLakeFlyer
Copy link
Contributor

Still odd you would see it on multiple OS

@rubenp02
Copy link
Contributor Author

I'm not able to properly look into it at the moment but here's a video of the issue on a high end Windows:
https://github.com/user-attachments/assets/17d23014-ea1d-4526-a5e6-6227bbceb5a0

That's the latest 4.4.3 release vs a Release build of the latest master commit at the time of this comment. Note that on the right (latest master) I'm trying to do exactly what I do on the left, but the view is completely stalled. Then I try the drag gestures which seem ever so slightly more responsive but still what I consider to be completely unusable. I've also done the same test shown in the video while running the QML debugger on a Profile build:

imagen
latest-master-250-wp-performance.zip

As you can imagine, on a Skydroid H16 you can't even pan the view at all, let alone edit the mission, and even if you just want to load it and go back to the Fly View the app crashes within minutes. I have also tried the installer artifact from the 9beae12 Windows test workflow and was able to replicate the problem there as well. That being said, if neither of you are seeing the same issue, I guess it must somehow be a problem on my end.

@DonLakeFlyer
Copy link
Contributor

@rubenp02 Can you try setting 'cacheBuffer' to 0 here: https://github.com/mavlink/qgroundcontrol/blob/master/src/PlanView/PlanView.qml#L755

Run it with the profile as well and provide output like you did above.

@rubenp02
Copy link
Contributor Author

The performance is a lot better but still pretty bad. Panning the map is now responsive, and the WP list is a lot smoother but still not usable as the attached video shows. You can see I also get a bug where clicking the last waypoint actually opens one of the first elements in the mission, scrolling back the list to almost the beginning.

cacheBuffer-0-performance-test-master.mp4

And here's the profiling output:

imagen
cacheBuffer-0-latest-master-250-wp-performance.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants