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
cache theme html file #3
Comments
Hey @alessioalex! Nice to meet you and thank you for reporting this! You are absolutely right about this -- I have fixed this behavior by loading the template file once in the package constructor. :) |
eladnava
added a commit
that referenced
this issue
May 26, 2016
Thanks to @alessioalex for the suggestion in #3!
Hey! No problem. I've opened another 2 issues, let me know if you have time to take a look over them or if you need some help. Cool module btw, thanks! |
Excellent, glad you like it :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently if you generate 5000 emails it will synchronously load the theme file 5000 times: https://github.com/eladnava/mailgen/blob/master/index.js#L51
It would be better to keep the theme html file content into memory so that the
generate
function won't try to read it each time from disk. That would be a massive improvement.The text was updated successfully, but these errors were encountered: