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

penalty on performance #41

Open
cordoval opened this issue Jul 6, 2017 · 2 comments
Open

penalty on performance #41

cordoval opened this issue Jul 6, 2017 · 2 comments

Comments

@cordoval
Copy link
Member

cordoval commented Jul 6, 2017

There is no freaking way in symfony to prevent the extension to warm up the object constructors and performance-wise this is not acceptable.

The extension always loads, no way around it because it is tokenParser depending on other objects

I disabled the bundle and just reusing the service directly on my mailer service when i need it.

@sstok
Copy link

sstok commented Nov 18, 2017

Twig supports RuntimeLoaders that allow to lazily load an external dependency. You properly need to change some things as the File locator during compile time is not very helpful and hurts performance.

But the great thing about RuntimeLoaders is that can actually be services.

@cordoval
Copy link
Member Author

cordoval commented Nov 18, 2017

@sstok on my project i am injecting

    /**
     * @var ToInlineStyleEmailConverter
     */
    private $converter;

not sure i remember why i created this issue, perhaps before i was using a declared service by the bundle but currently i don't have the bundle registered on my kernel.
So i guess i don't impact performance on my project.

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