hi there,
as already explained here, psalm takes minutes before even starting scanning the files. I don´t really understand what's going on, but I am not able to use it. because phpstorm has a timeout of 60 seconds, I will never be able to use psalm there 😕
my project has 100k lines of code (vendor excluded: 1,3 million LOC).
for testing, I was calling psalm within windows, files are located on the win filesystem as well, I wanted to be sure that is has nothing to do with samba, NFS, or any kind of folder sharing:
php-7.4.13-Win32-vc15-x64\php.exe vendor\vimeo\psalm\psalm --diff --threads=50 -c psalm.xml --no-cache --debug --output-format=phpstorm --show-info=true mode\Mode_order.php
scanning a single file takes:
with --no-cache: 3 minutes before psalm says "scanning files"
with cache: 2 minutes
the actual scanning process of a single file takes 28,7 seconds:
Checks took 28.76 seconds and used 264.131MB of memory
Psalm was able to infer types for 82.7434% of the codebase
here's my config:
<?xml version="1.0"?>
<psalm
errorLevel="8"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
cacheDirectory="cache"
>
<projectFiles>
<directory name="." />
<ignoreFiles>
<directory name="vendor" />
<directory name="/vendor" />
<directory name="./vendor" />
</ignoreFiles>
</projectFiles>
</psalm>
the vendor here is only for testing because i wanted to be 100% sure, that it gets excluded.
the fact is, the debug output shows me, that "Parsing" and "Scanning" also happens inside the vendor folder, i don´t know if that should happen or not.
as mentioned here, I can see that ALL files are scanned, even the files in vendor
. on the one hand, I do understand, that it´s necessary to know other files to be able to say what´s wrong or not, but if every scan, even with --diff
and cache
takes 2 minutes before the real scanning of a single files starts, psalm wouldn´t be usable for me and my project, which is sad. I don´t know this takes so long because of the project (too many files) or if something else is wrong here.
I hope, someone can help me to find out.
thanks,
micha