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

MultithreadedAnalysis with file hashing and caching #2388

Merged
merged 11 commits into from
Oct 8, 2021

Conversation

eddynaka
Copy link
Collaborator

@eddynaka eddynaka commented Sep 24, 2021

This change will enable Caching of the results when --insert Hashes is enabled.

Current design:
FileEnumerator adds to HashChannel
HashAsync reads from HashChannel and write in AnalysisChannel
AnalysisAsync starts processing.

Removing hashes computation,  marking hash as complete

Adding tests, updating FileSystem

Fixing condition to create hash
@@ -384,11 +411,12 @@ private async Task<bool> FindFilesAsync(TOptions options, TContext rootContext)
filePath: file)
);

await _fileEnumerationChannel.Writer.WriteAsync(_fileContextsCount++);
await _hashChannel.Writer.WriteAsync(_fileContextsCount++);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

_hashChannel

adding to hashChannel so it can generate the hash if computeHash is enabled.

@eddynaka eddynaka marked this pull request as ready for review September 28, 2021 11:54
@@ -0,0 +1,4 @@
{
"AssembliesPath":"..\\..\\bld\\bin\\AnyCPU_Debug\\Test.UnitTests.Sarif.Driver\\netcoreapp3.1",
Copy link
Collaborator

@suvamM suvamM Sep 30, 2021

Choose a reason for hiding this comment

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

@eddynaka This path is incorrect for releases. #Closed

# Visual Studio Version 16
VisualStudioVersion = 16.0.29709.97
# Visual Studio Version 17
VisualStudioVersion = 17.0.31728.443
Copy link
Collaborator

@shaopeng-gh shaopeng-gh Oct 7, 2021

Choose a reason for hiding this comment

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

Question, this is version 2022 right, do we want to upgrade, should we revert this change? #Closed

Copy link
Collaborator

Choose a reason for hiding this comment

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

the other file NuGet.Config maybe also auto changed by VS 2022. my only question is if solution still works for VS 2019 if so we can check it in.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it does not matter if u are using VS2019 or VS2022.

The nuget change is just to show when we open the sln.

Copy link
Collaborator

@shaopeng-gh shaopeng-gh left a comment

Choose a reason for hiding this comment

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

:shipit:

@eddynaka eddynaka merged commit ca1c2c9 into main Oct 8, 2021
@eddynaka eddynaka deleted the users/ednakamu/hashing-approach-2 branch October 8, 2021 13:02
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