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

[11.x] Additonal Blade Loop Improvements #51217

Closed

Conversation

lonnylot
Copy link
Contributor

Using same benchmarking as in #51158

Before:

OPCache Enabled: Enabled
With caching: 164.14968581818

After:

OPCache Enabled: Enabled
With caching: 135.41356454545

Essentially the framework is suffering from a death by 1,000 cuts for anything in a loop. Anything that is repeatable (e.g. Compiler::getCompiledPath) or anything that includes unnecessary indirection (e.g. View::name) should be cleaned up.

Each one of these changes improved performance by ~1-3%. Combined it was ~15-20%.

Copy link

Thanks for submitting a PR!

Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@lonnylot
Copy link
Contributor Author

I'll try to review / update the tests this weekend. Wanted to at least push so it could be visible. If anyone has the time feel free to pitch in.

use InvalidArgumentException;
use Illuminate\Contracts\Support\Renderable;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\View\Factory as FactoryContract;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the order of import is alphabetical ascending and not by length.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks crynobone. I'll adjust it when I go through the failing tests.

@driesvints
Copy link
Member

Going to close this one now. Feel free to resend with passing tests when you have the time.

@driesvints driesvints closed this Jul 26, 2024
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.

3 participants