Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving parser performance #5

Open
sevfurneaux opened this issue Nov 17, 2018 · 5 comments
Open

Improving parser performance #5

sevfurneaux opened this issue Nov 17, 2018 · 5 comments

Comments

@sevfurneaux
Copy link

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 😁

@assertchris
Copy link
Member

assertchris commented Jan 19, 2019

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.

@assertchris
Copy link
Member

@sevfurneaux if you think phpx is interesting, check out the experiment I have going: https://github.com/preprocess/example-phpx-live

@sevfurneaux
Copy link
Author

@assertchris Thanks – this is super interesting!

@assertchris
Copy link
Member

Wrote a post about how it works, here: https://assertchris.io/post/2019-01-19-phpx-live

@sevfurneaux
Copy link
Author

Very cool! Will read up on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants