You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some weeks ago I started having performance problems in my production environment (Heroku) when sending emails with premailer - even using delayed job. Under development environment everything was running fine. My CSS is big, with Bootstrap inside it, and yes, I'm using Bootstrap to add some styles to my email messages.
I started debugging it and, after several tests, I was able to fix the problem using a non-compressed version of my application.css to send emails. This new file, called application-non-compressed.css has the same number of selectors then the original one, the only difference is that the non-compressed version was generate with "config.assets.compress = false" and was not minified.
Heroku delayed job / worker log:
Compressed CSS: Class#deliver completed after 194.4798
Non-Compressed CSS: Class#deliver completed after 5.2357
Is there any issue with premailer and big compressed CSS files?
Thanks.
The text was updated successfully, but these errors were encountered:
I'm also seeing this issue, and having a heck of a time working around it (since we're using SCSS which really wants to compress the output). Any idea what's causing this performance issue in the parser or did you figure out a workaround?
As a workaround I created a CSS file called "/public/assets/application-non-compressed.css" and, inside mail.html.erb (template/view used by mailer) I called for it instead "application.css". Like this:
The content of application-non-compressed.css was gathered from application.css under development environment with "config.assets.debug = false", so I got the CSS in only one file and not compressed.
Of course, if you change your CSS file you will need to update manually application-non-compressed.css.
Hi,
Some weeks ago I started having performance problems in my production environment (Heroku) when sending emails with premailer - even using delayed job. Under development environment everything was running fine. My CSS is big, with Bootstrap inside it, and yes, I'm using Bootstrap to add some styles to my email messages.
I started debugging it and, after several tests, I was able to fix the problem using a non-compressed version of my application.css to send emails. This new file, called application-non-compressed.css has the same number of selectors then the original one, the only difference is that the non-compressed version was generate with "config.assets.compress = false" and was not minified.
Heroku delayed job / worker log:
Is there any issue with premailer and big compressed CSS files?
Thanks.
The text was updated successfully, but these errors were encountered: