-
-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix performance issue #2774
Fix performance issue #2774
Conversation
Looks like tests failing is not related to my changes |
This would be a great improvement 👍 What are the before/after numbers on how big project? |
We have about 4k files. Before it takes about 30 minutes and sometime was freezes and after about 6 minutes. |
I've retriggered the CI, but it seems to fail because of this change. The CI is passing well, at least 1 minute ago: #2775 |
Wow, that's amazing 😮 |
fb85845
to
e40d112
Compare
I rebased my branch onto |
Thanks you 👍 Let's get this to |
I tried it on Symplify project and both before/after this change take 30 seconds. Probably depends on used autoload paths. Could you share your |
Looking at last 2 downgrade builds for rector-src in main branch for source + vendor, they seems faster (only 3 minutes) which seems means there is speed improvement |
Could you link those builds? I'd like to check |
I probably was miss click, its there: |
Interesting... 👏 a week ago it was even 4:20 |
Hi @TomasVotruba, I'm, using the following config: return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__.'/src',
__DIR__.'/tests',
]);
$rectorConfig->symfonyContainerXml(__DIR__.'/var/cache/test/App_KernelTestDebugContainer.xml');
$rectorConfig->importNames();
$rectorConfig->importShortClasses(false);
$rectorConfig->disableParallel();
// PHP
$rectorConfig->import(LevelSetList::UP_TO_PHP_81);
$rectorConfig->import(SetList::CODE_QUALITY);
$rectorConfig->import(SetList::DEAD_CODE);
$rectorConfig->import(SetList::TYPE_DECLARATION_STRICT);
// Symfony
$rectorConfig->import(SymfonyLevelSetList::UP_TO_SYMFONY_54);
$rectorConfig->import(SymfonySetList::SYMFONY_STRICT);
// Doctrine
$rectorConfig->import(DoctrineSetList::DOCTRINE_ORM_29);
$rectorConfig->import(DoctrineSetList::DOCTRINE_CODE_QUALITY);
$rectorConfig->import(DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES);
// PHPUnit
$rectorConfig->import(PHPUnitLevelSetList::UP_TO_PHPUNIT_90);
$rectorConfig->import(PHPUnitSetList::PHPUNIT_CODE_QUALITY);
$rectorConfig->import(PHPUnitSetList::PHPUNIT_EXCEPTION);
$rectorConfig->import(PHPUnitSetList::PHPUNIT_SPECIFIC_METHOD);
}; |
Thanks for sharing 👍 It seems quite rich on sets 💪 |
@TomasVotruba Are you going to release this? |
Yes :) |
Hey, I just wanted to leave my feedback here: really nice improvement, our CI step went from |
@pheller24 Thank you for reaching out 👍 ❤️ I love to see huge improvements... all credit goes to @ossinkine 🙏 |
I faced with performance issue on my project. When I run
rector process
on big number of files it takes a lot of time. I profiled this command and found that NodeScopeResolver is decorated on each node processing. As result there is a huge staketrace:I moved decoration to constructor to do it once and it boost performance a lot.