-
Notifications
You must be signed in to change notification settings - Fork 113
Open
Labels
status:requirementsFull requirements are not yet known, so implementation should not be startedFull requirements are not yet known, so implementation should not be startedtype:refactorRefactoring or improving of existing codeRefactoring or improving of existing code
Description
Currently we're creating a single ActionBlock per detector, however we should look into using one shared ActionBlock across all detectors.
We're running each detector here:
Line 69 in 368f3c9
| () => detector.ExecuteDetectorAsync(new ScanRequest(detectionArguments.SourceDirectory, exclusionPredicate, this.Logger, detectorArguments, detectionArguments.DockerImagesToScan, componentRecorder)), |
Which eventually creates a new ActionBlock:
component-detection/src/Microsoft.ComponentDetection.Contracts/FileComponentDetector.cs
Lines 92 to 94 in 368f3c9
| private async Task<IndividualDetectorScanResult> ProcessAsync(IObservable<ProcessRequest> processRequests, IDictionary<string, string> detectorArgs) | |
| { | |
| var processor = new ActionBlock<ProcessRequest>(async processRequest => await this.OnFileFound(processRequest, detectorArgs)); |
Recommended after speaking with @dfederm
Metadata
Metadata
Assignees
Labels
status:requirementsFull requirements are not yet known, so implementation should not be startedFull requirements are not yet known, so implementation should not be startedtype:refactorRefactoring or improving of existing codeRefactoring or improving of existing code
Type
Projects
Status
Ready