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

Revision reader tweak #11170

Merged
merged 2 commits into from Aug 25, 2023

Conversation

gerhardol
Copy link
Member

Proposed changes

Avoid replace \v in email etc (not needed, performance).

Make revision reading slightly easier to read.

IDE0008 in RevisionReader.cs

This originated as a review to see if it was possible to improve the performance, primarily to see if allocations could be eliminated, but it does not seem there is big difference.
Still, this is critical code when opening repos.

Test methodology

Manual

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.

Avoid replace \v in email etc

Make revision reading slightly easier to read.
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.

LGTM

GitCommands/RevisionReader.cs Show resolved Hide resolved
GitCommands/RevisionReader.cs Show resolved Hide resolved
GitCommands/RevisionReader.cs Outdated Show resolved Hide resolved
Copy link
Member

@RussKie RussKie left a comment

Choose a reason for hiding this comment

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

👍

}

public (string? subject, string? body, bool hasMultiLineMessage) PeekSubjectBody(bool skipBody)
[MethodImpl(MethodImplOptions.AggressiveInlining)]
Copy link
Member

Choose a reason for hiding this comment

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

How did you decide this attribute is necessary?

Copy link
Member Author

Choose a reason for hiding this comment

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

This routine can be executed 100K every time the revisions are reloaded, so speed is preferred over code size
I considered removing the internal class StringLineReader to give the compiler some more hints.
I doubt this is measurable though.

@RussKie RussKie added the 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity label Aug 24, 2023
@ghost ghost removed the 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity label Aug 24, 2023
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.

👍

@gerhardol gerhardol merged commit 898a33a into gitextensions:master Aug 25, 2023
3 of 4 checks passed
@gerhardol gerhardol deleted the feature/tweak-rev-reader branch August 25, 2023 19:59
@ghost ghost added this to the vNext milestone Aug 25, 2023
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

3 participants