Skip to content

Use single shared ActionBlock #235

Open
@JamieMagee

Description

@JamieMagee

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:

() => detector.ExecuteDetectorAsync(new ScanRequest(detectionArguments.SourceDirectory, exclusionPredicate, this.Logger, detectorArguments, detectionArguments.DockerImagesToScan, componentRecorder)),

Which eventually creates a new ActionBlock:

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

No one assigned

    Labels

    status:requirementsFull requirements are not yet known, so implementation should not be startedtype:refactorRefactoring or improving of existing code

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions