Skip to content

Up-To 1600 % Faster ECS with Parallel run

Choose a tag to compare

@TomasVotruba TomasVotruba released this 29 Sep 04:33
· 401 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 🙏