Skip to content

Conversation

gerhardol
Copy link
Member

Depends on #11947

Proposed changes

Split in two commits for review:

  • GE diff highlighting, if Git coloring is not used (Git colors were cached already)
  • Inline processing to find common parts

Before this processing was done every time a marker was changed in the diff viewer.
(before #11947 the complete text was parsed every time too)

Test methodology

Refactoring only, tests exists

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.

@gerhardol gerhardol marked this pull request as draft October 14, 2024 20:41
@gerhardol gerhardol force-pushed the feature/cache-textmarkers branch from f9cf606 to c79e925 Compare October 19, 2024 20:02
@gerhardol gerhardol marked this pull request as ready for review October 19, 2024 20:13
Copy link
Member

@mstv mstv left a comment

Choose a reason for hiding this comment

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

just an allocation optimization

Copy link
Member

@mstv mstv left a comment

Choose a reason for hiding this comment

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

👍

Cache the diff markings, only calculate when a file is added,
not everytime marking is changed in the file.
This was already the case for diff coloring by Git,
but not by the (simpler) GE engine.
The caching also applies to the inline difference calculations,
to dim part of lines that are unchanged.
@gerhardol gerhardol force-pushed the feature/cache-textmarkers branch from 46c800b to 5e31f51 Compare October 20, 2024 18:24
@gerhardol gerhardol merged commit 8139249 into gitextensions:master Oct 21, 2024
4 checks passed
@gerhardol gerhardol deleted the feature/cache-textmarkers branch October 21, 2024 21:31
@RussKie RussKie added this to the 5.1 milestone Oct 29, 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.

3 participants