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

Compilation of templates is VERY slow #10

Open
josefsabl opened this issue Oct 24, 2016 · 2 comments
Open

Compilation of templates is VERY slow #10

josefsabl opened this issue Oct 24, 2016 · 2 comments

Comments

@josefsabl
Copy link
Contributor

Today I found out that the compilation is qutie slow for rather large email. I have an email layout with some Inky template elements and inside the content block of layout is one large table (1000 rows) that itself does not contain any Inky special elements. The comilation of one such e-mail takes 150 seconds. It means that it is 0.15 s per one row in the e-mail, that is VERY slow.

@thampe
Copy link
Owner

thampe commented Nov 6, 2016

Hi,

this seems about right. Right now I do not have time or any ideas to make it reasonably faster. If you have got some ideas, feel free to offer them.

@josefsabl
Copy link
Contributor Author

Now the problem worsens. Before the e-mail template was quite large. Now we ran into problems with quite simple template that easily matches one screen. One such e-mail takes ridiculous 2.5 s to process. I think that paquettg/php-html-parser is to blame. I tried to profile the template compilation and isolated the slowness in \PHPHtmlParser\Selector->seek() method which gets called 30 times and takes almost 2 seconds for one e-mail.

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