MJML to HTML slow

93 Views Asked by At

I'm having a little problem converting MJML to HTML in Symfony 4. More in detail, when I want to send mail on redis it takes a long time, 2 mails per second for 1500 users. Do you have any solutions for me, please?

Also, when I order : time ./node_modules/.bin/mjml --version

I get this:

bash-5.1# time ./node_modules/.bin/mjml --version
mjml-core: 4.14.1
mjml-cli: 4.14.1

real 0m0.389s
user 0m0.441s
sys 0m0.020s

I've noticed that it's this code in particular that takes the longest:

{% apply mjml_to_html %}
    <mjml>
        <mj-body>
        </mj-body>
    <mjml>
    {% endapply %}

I tried a bundle: https://github.com/assoconnect/mjml-bundle/tree/master

But the problem is that it's deprecated and quite complex for me to implement in terms of security and dependency conflicts.

That's why I'd like a possible solution

I also thought of the warmup cache but I don't know how to use it.

0

There are 0 best solutions below