pre-phpx
pre-phpx copied to clipboard
Improving parser performance
This project is great!
My only hesitation to not use this in production is the parser compile time.
Any points in the parser where it could be improved? Happy to help 😁
I'm sure there is loads in the parser that could be made better. I am working on a pre/plugin refactor at the moment, so I'll come back to this when that's done. In the meantime, you can create a pre.lock file in the project root, which will disable the automatic rebuild of every PSR-4 class on every invocation.
Edit:
@sevfurneaux: I have released a version of pre/plugin which doesn't throw errors while generating an optimised autoloader. You can use version ^0.11.4. Running composer du -o should pre-compile all the .pre files (included with PSR-4) and then disable the custom autoloader. You should then have opcache-enabled PHP files in production, making this virtually zero-cost to use there.
@sevfurneaux if you think phpx is interesting, check out the experiment I have going: https://github.com/preprocess/example-phpx-live
@assertchris Thanks – this is super interesting!
Wrote a post about how it works, here: https://assertchris.io/post/2019-01-19-phpx-live
Very cool! Will read up on this.