Uh oh!
There was an error while loading. Please reload this page.
Revert "Revert "use NewOptimizedDirectorySourceLocator"" - #4846
Conversation
samsonasik
commented
Aug 24, 2023
@TomasVotruba I am looking why new PHPStan 1.10.31 cause error: https://github.com/rectorphp/rector-src/actions/runs/5965825544/job/16184110293#step:10:19 |
Uh oh!
There was an error while loading. Please reload this page.
Thanks 👍 Could you lock |
samsonasik
commented
Aug 24, 2023
Ok, I will temporary lock phpstan to |
dd2aa10 to
f54fa71CompareThis reverts commit f54fa71.
samsonasik
commented
Aug 24, 2023
@TomasVotruba since the build is working ok now, let's try this 👍 |
| foreach ($this->filesByDirectory as $files) { | ||
| $sourceLocators[] = new OptimizedDirectorySourceLocator($this->fileNodesFetcher, $this->phpVersion, $files); | ||
| foreach ($this->directories as $directory) { |
There was a problem hiding this comment.
@TomasVotruba I tested this in CodeIgniter4 project, it make consistency 1 second faster.
Also make correct apply ::class tested at:
I will check more if this while improve performance, on complex files in target dir, eg contains .xml file, it read unnecessary files, since it fetch files under directory instead of read only listed files in the directory.
There was a problem hiding this comment.
@TomasVotruba I debugged, the OptimizedDirectorySourceLocatorFactory utilize PHPStan FileFinder that already only cover php extensions, so I guess it already cover only scan php files.
PHPStan\File\FileFinder#3115
fileExcluder: PHPStan\File\FileExcluder#3113
fileExtensions: array (1)
| 0 => 'php'so I think it already ok 👍
Reverts #4845