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

Simplify revision grid repainting #11048

Conversation

MaxKoll
Copy link
Contributor

@MaxKoll MaxKoll commented Jun 14, 2023

Proposed changes

Repaint by invoking Update() at the end of each BackgroundUpdater operation instead of using a quasi-periodic approach.

Before

Repaints are triggered periodically by the Scroll event and do not coincidence with the asynchronous revision graph updates.

After

  • Repaint after every revision graph update.
  • Simpler code.

Test methodology

  • Observing WM_PAINT messages via WndProc() override.
  • Lots of scrolling the revision grid.

Test environment(s)

  • Git 2.38.1.windows.1
  • Microsoft Windows NT 10.0.19045.0
  • .NET 6.0.16
  • DPI 134dpi (140% scaling)

Merge strategy

I agree that the maintainer squash merge this PR (if the commit message is clear).


✒️ I contribute this code under The Developer Certificate of Origin.

Repaint by invoking Update() at the end of each BackgroundUpdater
operation instead of using a quasi-periodic approach.
@ghost ghost assigned MaxKoll Jun 14, 2023
@mstv
Copy link
Member

mstv commented Jun 16, 2023

Occasionally, only one graph lane is shown on refresh after an operation - for long time or until a manual refresh. It might be related to some background git commands which can take very long on the affected (private) repos. I need to observe it longer.

Copy link
Member

@gerhardol gerhardol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seem OK, have not used it

@MaxKoll
Copy link
Contributor Author

MaxKoll commented Jun 16, 2023

Occasionally, only one graph lane is shown on refresh after an operation - for long time or until a manual refresh. It might be related to some background git commands which can take very long on the affected (private) repos. I need to observe it longer.

I must admit I have not tested it intensely outside the context of scrolling. I'm unsure how this could affect anything other than repaints during scrolling, as the only thing gone is the periodic call to Update() in OnScroll(). Every other line is just overhead.

I would therefore assume that the added await this.InvokeAsync(Update); inside UpdateVisibleRowRangeInternalAsync() is causing problems, but how?

@RussKie
Copy link
Member

RussKie commented Jun 18, 2023

The rebase operation is notorious for leaving the graph incomplete and undrawn (e.g., #9223). Perhaps, this could provide more testing opportunities.

@mstv
Copy link
Member

mstv commented Jun 18, 2023

It is different from #9223 where no graph is displayed at all.

@mstv
Copy link
Member

mstv commented May 14, 2024

Thank you for bringing this up. Included in and superseded by #11719.

@mstv mstv closed this May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants