Skip to content

Up-To 1600 % Faster ECS with Parallel run

Compare
Choose a tag to compare
@TomasVotruba TomasVotruba released this 29 Sep 04:33
· 279 commits to main since this release

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:


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 馃檹