Skip to content

Improve symbol extraction performance

Compare
Choose a tag to compare
@janmartenjongerius janmartenjongerius released this 09 Jul 13:23
· 97 commits to master since this release
b3c77d4

The performance of extraction of symbols from files has been improved. This is done by choosing a more efficient way to read the contents of files. Previously, file content was imploded to a string, by transforming an SplFileObject to an array, which slowed down during traversal of the iterator. This is switched out with a singular synchronous read on the file.

In some places, array_reduce is replaced by a foreach, to allow early breaks without additional function call overhead.

Thanks to @willemstuursma