-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[php2cpg] Improve performance. (#4867)
* [php2cpg] Improve performance. This php parser we use seems to have some warmup phase in which it has very poor performance which makes it very expensive to feed it single files like we so far did. This change invokes the php parser with groups of 20 files which on my machine give ~40% performance increase for the total frontend runtime on large projects. Bigger groups of files strangely only show marginal performance increases despite the fact that profiling the frontend indicates that there is still a lot of time wasted by the large amount of individual parser invocations. For now we keep it like this because for bigger groups we would run into argument length limitations which are especially a pain on systems like Windows. Sadly the php parser does not provide means to specify the to be parsed files other than as a list on the command line. So there would need to be some change there first before we could increase the groups size in a meaningful way.
- Loading branch information
Showing
4 changed files
with
181 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.