Closed doits closed 3 years ago
@doits Sorry it took me so long to get to this - I think the Mjml::Mjmltemplate
was something inherited from the original project I forked it from, so I don't know of its significance.
Let's try your solution and see how it goes. It looks fine in my projects, and I agree the regex update speeds things up too.
While working on it I saw this indirection to
Mjml::Mjmltemplate
. Looks like the parser can be simply called byMjml::Handler
directly which makes it simpler. Or is there any special need for this indirection?In addition it extracts the
Handler
to an own file and I simplified the regex a little bit to be non greedy, so it does not match/parse then whole template anymore, which might be a little bit faster (not tested though).