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

Redrawing of Navigator for large scores causes more lag than in MS3 #10201

Open
dxing97 opened this issue Dec 29, 2021 · 7 comments · Fixed by #19639
Open

Redrawing of Navigator for large scores causes more lag than in MS3 #10201

dxing97 opened this issue Dec 29, 2021 · 7 comments · Fixed by #19639
Labels
community Issues particularly suitable for community contributors to work on performance Performance issues (e.g. high CPU usage) regression MS3 Regression from MS3 (3.6.2)

Comments

@dxing97
Copy link

dxing97 commented Dec 29, 2021

(Updated after #19639, which has improved the situation a lot when only the blue rectangle inside the Navigator has to be updated, but still very laggy when the whole Navigator needs to be redrawn)

Describe the bug
If the navigator is open on a score with many measures, parts, and/or notes, the frame rate drops significantly and scrolling across the score becomes difficult. If the score is large/complex enough, it can become unusably slow.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new score using the Orchestral -> Symphony Orchestra template
  2. Click on Add->Measures->Append Measures
  3. Append 500 measures.
    Scrolling around zoomed in is very smooth. If zoomed out such that the entire score fits in the workspace, scrolling becomes slow.
  4. Click on View -> Navigator
    When the Navigator has to be redrawn (for example, when its viewport changes), MS4 lags more than MS3.

Expected behavior
Smooth scrolling when not zoomed out on a large score with the navigator open.

Additional context
Also present in MuseScore 3.6.2. Can occur with significantly fewer measures if there are many notes/elements on the staff.

@Tantacrul Tantacrul added the P2 Priority: Medium label May 30, 2022
@Tantacrul Tantacrul removed the P2 Priority: Medium label May 30, 2022
@Tantacrul

This comment was marked as outdated.

@bluebear94

This comment was marked as resolved.

@github-project-automation github-project-automation bot moved this to To triage in MuseScore 4.2 Jul 13, 2023
@cbjeukendrup cbjeukendrup added the regression MS3 Regression from MS3 (3.6.2) label Jul 13, 2023
@bluebear94
Copy link
Contributor

Commenting out the emit viewportChanged(); line in AbstractNotationPaintView::onMatrixChanged removes the lag. The bottleneck is probably there.

@bluebear94
Copy link
Contributor

Just noticed the part of the profiler that shows profiling info for other threads. Actually looks like the navigator is repainting itself excessively.

@bluebear94
Copy link
Contributor

bluebear94 commented Oct 6, 2023

Actually, MS3 seems to redraw the navigator on every update, so why does MS4 take a lot longer to do that?

Edit: from observing MS3 behavior, I’ve noticed that dragging the rectangle in a way that causes the navigator to scroll is less smooth than otherwise, so not repainting on every update might have to do with it.

bluebear94 added a commit to bluebear94/MuseScore that referenced this issue Oct 6, 2023
This avoids having to redraw the whole navigator when only the
cursor is moved, improving performance on large scores.

Resolves musescore#10201 (partially)
@oktophonie oktophonie moved this from To triage to In Progress in MuseScore 4.2 Oct 20, 2023
bluebear94 added a commit to bluebear94/MuseScore that referenced this issue Nov 4, 2023
This avoids having to redraw the whole navigator when only the
cursor is moved, improving performance on large scores.

Resolves musescore#10201 (partially)
@github-project-automation github-project-automation bot moved this from In Progress to Done in MuseScore 4.2 Nov 6, 2023
@bluebear94
Copy link
Contributor

This issue is only partially solved. When the navigator viewport changes, then redrawing the contents is slower in MS4 than in MS3.

@cbjeukendrup cbjeukendrup reopened this Nov 7, 2023
@github-project-automation github-project-automation bot moved this from Done to To triage in MuseScore 4.2 Nov 7, 2023
@cbjeukendrup
Copy link
Contributor

Reopening because of the comment above

@cbjeukendrup cbjeukendrup changed the title [MU4 Issue] Navigator causes excessive lag when opening large scores on macOS Redrawing of Navigator for large scores causes more lag than in MS3 Nov 7, 2023
@cbjeukendrup cbjeukendrup moved this to One of the next releases in MuseScore Studio Backlog May 19, 2024
@cbjeukendrup cbjeukendrup added community Issues particularly suitable for community contributors to work on performance Performance issues (e.g. high CPU usage) labels Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Issues particularly suitable for community contributors to work on performance Performance issues (e.g. high CPU usage) regression MS3 Regression from MS3 (3.6.2)
Projects
Status: Available
Status: Some release after that
Development

Successfully merging a pull request may close this issue.

5 participants