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

slowing down my test suite by factor 15 #46

Open
krtschmr opened this issue Sep 26, 2019 · 6 comments
Open

slowing down my test suite by factor 15 #46

krtschmr opened this issue Sep 26, 2019 · 6 comments
Assignees

Comments

@krtschmr
Copy link

Finished in 47.38 seconds (files took 5.35 seconds to load)
567 examples, 0 failures

vs.

Finished in 6 minutes 9 seconds (files took 5.45 seconds to load)
567 examples, 0 failures

well, that escalated quickly.
i wonder how we can speed that up for our test suite? send out emails without bootstrap? can't really be an option for a test suite somehow.

@krtschmr
Copy link
Author

class ApplicationMailer
  layout Rails.env.test? ? false : 'mailer'


  if Rails.env.test?
    def make_bootstrap_mail(args)
      mail(args)
    end
  end

well, this is the quick hotfix. don't use the layout to send mails and just mock the make_bootstrap_mail and let it do default.

i wonder - did nobody ever had this issue before or do people not test their emails?

@stuyam stuyam self-assigned this Nov 11, 2019
@majksner
Copy link

I'm experiencing similar issue when sending a newsletter with Sidekiq, 50 emails get processed quickly then queue is stuck to 1 or 2 minutes and then it starts working again and so on.

@gresbtim
Copy link

@majksner i never figured out why. the compilation of the bootstrap is insanely slow, but once you have it, it should be done and persist 🤷

@majksner
Copy link

This might not be related to this gem. I'm using mailgun in production but when I use config.action_mailer.delivery_method = :letter_opener_web in development I don't experience any slowdowns. I'll test more and report.

@EyMaddis
Copy link

EyMaddis commented Mar 8, 2021

I also just tested it (via CLI). It takes >3seconds for compiling. How it take so long to transpile one html format to another?

For me that is ok, I just compile it before deploying. But this is still quite extreme. Especially in development, where I recompile on every changes and the browser preview has a very noticeable delay.

@stuyam
Copy link
Member

stuyam commented Mar 13, 2021

Performance is important, it is something we are constantly trying to improve. After more of the new alpha 1.0.0 version is solidified performance will become a bigger priority 👍

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

5 participants