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

Improve performance with large solutions #297

Merged
merged 7 commits into from
Oct 26, 2022

Conversation

kmaddock
Copy link

@kmaddock kmaddock commented Oct 5, 2022

Use a dictionary map from file name to lines to avoid searching through the entire coverage database for every file.

Improves VS responsiveness with large solutions

@tonyhallett
Copy link
Collaborator

sorry for the delay. will look at shortly

.ToArray();
}
private IEnumerable<Engine.Cobertura.Line> GetApplicableLines(string filePath, int startLineNumber, int endLineNumber)
=> coverageLines.GetLines(filePath, startLineNumber, endLineNumber).ToArray();
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove ToArray

{
if (!m_coverageLines.TryGetValue(filename, out var classCoverageLines))
{
classCoverageLines = new List<Line>();
Copy link
Collaborator

Choose a reason for hiding this comment

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

change variable name to fileCoverageLines

SharedProject/Core/FCCEngine.cs Outdated Show resolved Hide resolved
SharedProject/Core/FCCEngine.cs Outdated Show resolved Hide resolved
SharedProject/Core/Model/FileLineCoverage.cs Outdated Show resolved Hide resolved
@tonyhallett tonyhallett merged commit 86dd4db into FortuneN:master Oct 26, 2022
@github-actions
Copy link

released v1.1.187 and available on marketplace

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.

2 participants