Skip to content

glahaye/ParallelizableAnalyzer

Repository files navigation

ParallelizableAnalyzer

A code analyzer to detect potential opportunities to parallelize async tasks

It works by detecting method definitions containing "await" expressions and identifies candidates for parallelization.

The idea is to transform code such as:

// Wait for both tasks to complete - Total time is sum of the two tasks
await TaskThatTakesTwoSeconds();
await TaskThatTakesThreeSeconds();

into code such as:

taskThatTakesTwoSecondsTask = TaskThatTakesTwoSeconds();
taskThatTakesThreeSecondsTask = TaskThatTakesThreeSeconds();

// Wait for both tasks to complete - Total time is the max of the two tasks
await Task.WhenAll(taskThatTakesTwoSecondsTask, taskThatTakesThreeSecondsTask);

About

A code analyzer to detect potential opportunities to parallelize async tasks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages