Up-To 1600 % Faster ECS with Parallel run
ECS gets 100 % faster per 1 CPU thread 馃殌
Do you have multi-core CPUs? ECS can run in X parallel threads, where X is number of your threads. E.g. with laptop with AMD Ryzen 4750U it is 16.
That means 1600 % faster run with same amount of analysed files. Did you code base took 16 minutes to fix? Now it's 1 minute.
This feature is:
- experimental - please test and report any issue at https://github.com/symplify/symplify/issues/new 馃悰
- should work on Windows too
Do you Want to Safe Time? 鈴诧笍
Try it:
// ecs.php
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\EasyCodingStandard\ValueObject\Option;
return static function (ContainerConfigurator $containerConfigurator): void {
$parameters = $containerConfigurator->parameters();
$parameters->set(Option::PARALLEL, true);
};
And that's it 馃槈
Aknowledgements
The parallel run is heavily based on @phpstan parallel run - thanks to Ond艡ej Mirtes for inspiration 馃檹