You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The modification time of files in the parser cache directory (ParserCacheProvider::PARSER_CACHE_DIRECTORY, php-parser) may be changed multiple times during a single run:
The mechanism that relies on touch() (likely introduced via e9b4eb6) could be replaced completely with one that deletes all cache files before a full run, or one that relies on a list of processed files for which a cache should be kept.
The text was updated successfully, but these errors were encountered:
The modification time of files in the parser cache directory (
ParserCacheProvider::PARSER_CACHE_DIRECTORY
,php-parser
) may be changed multiple times during a single run:in
ProjectAnalyzer::check()
(on full, diff run):psalm/src/Psalm/Internal/Analyzer/ProjectAnalyzer.php
Line 681 in 14dcbc9
by calling
ParserCacheProvider::touchParserCaches()
with the results ofProjectAnalyzer::getAllFiles()
, which may be particularly expensive, as the latter iterates recursively over all project directories, including unrelated files (see also: Suboptimal discovery of project files #7057)in
IssueBuffer::finish()
(on full run):psalm/src/Psalm/IssueBuffer.php
Line 732 in 14dcbc9
by calling
ParserCacheProvider::processSuccessfulRun()
which uses a simple loop overscandir($cache_directory)
Given that the only non-maintenance usage of modification time appears to be the comparison with source files at:
psalm/src/Psalm/Internal/Provider/ParserCacheProvider.php
Line 100 in 14dcbc9
the apparent reason is to allow purging of old cache files in
ProjectAnalyzer::check()
at:psalm/src/Psalm/Internal/Analyzer/ProjectAnalyzer.php
Lines 672 to 674 in 14dcbc9
by calling
ParserCacheProvider::deleteOldParserCaches()
, which seems to be non-functional:psalm/src/Psalm/Internal/Provider/ParserCacheProvider.php
Lines 322 to 324 in b359847
The mechanism that relies on
touch()
(likely introduced via e9b4eb6) could be replaced completely with one that deletes all cache files before a full run, or one that relies on a list of processed files for which a cache should be kept.The text was updated successfully, but these errors were encountered: