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

Compile frequently-used classes #25

Closed
wants to merge 1 commit into from

Conversation

thewilkybarkid
Copy link

To try and reduce the amount of classes that are autoloaded, I've tried to work out which Puli classes are frequently used in production and add them to the compiled list.

I imagine that this list isn't completely optimised (eg some missing).

@xabbuh
Copy link

xabbuh commented Mar 14, 2016

Given that this makes debugging harder and that nowadays Opcache alone should be sufficient is this really something worth to do?

@webmozart
Copy link
Member

Good question. Any benchmarks on a recent PHP version with an opcache?

@xabbuh
Copy link

xabbuh commented Mar 30, 2016

@javiereguiluz did some benchmarks for EasyAdminBundle (see javiereguiluz/EasyAdminBundle#1003). Not sure if that's helpful for you though.

@javiereguiluz
Copy link

In our case the gains were minimal. Be careful because the classes to compile can't contain neither annotations nor __DIR__ or __FILE__ constants, as @stof reminded me today while reviewing symfony/symfony-docs#6405.

@webmozart
Copy link
Member

Thanks for the feedback @javiereguiluz. I guess we can close this then.

@webmozart webmozart closed this Aug 10, 2016
@thewilkybarkid thewilkybarkid deleted the compiled-classes branch August 10, 2016 14:09
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

Successfully merging this pull request may close these issues.

4 participants