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
I can see the same files getting opened multiple times between 2-100s of times. 90% of file_get_contents calls here are duplicates, which means psalm could be 4% faster if that didn't happen.
We check if the file was opened before, but this is useless, since it's always empty:
if (isset($this->open_files[$file_path_lc])) {
return $this->open_files[$file_path_lc];
}
Changing $open_files to a static and using self::$open_files should fix this.
I tried this - however weirdly enough, $open_files still is always empty.
Any idea why this is happening though? (I can provide a PR with the static, however it has the same issue)
The text was updated successfully, but these errors were encountered:
FileProvider.php function getContents
When logging the
$file_path
directly before:I can see the same files getting opened multiple times between 2-100s of times. 90% of file_get_contents calls here are duplicates, which means psalm could be 4% faster if that didn't happen.
We check if the file was opened before, but this is useless, since it's always empty:
Changing
$open_files
to a static and usingself::$open_files
should fix this.I tried this - however weirdly enough, $open_files still is always empty.
Any idea why this is happening though? (I can provide a PR with the static, however it has the same issue)
The text was updated successfully, but these errors were encountered: