mardi 27 octobre 2015

Does using multiple ActionMailer classes increase memory overhead?

I'm currently using two Mailer classes in my Rails 3.2 app. One is AdminMailer, dedicated to sending emails to the internal team, and one is UserMailer to send emails to our registered users.

UserMailer is beginning to feel bloated, with 35 methods (i.e. 35 different emails) in it and counting. I could definitely take a subset of these emails that fit under a theme, and extract them out into a third Mailer class to make the code more manageable and readable.

My question is: Does it introduce more memory overhead on the app to need to instantiate more Mailer classes?

I tried searching for this on Google & Stack Overflow but didn't seem to find anything on the topic. Thanks!

Aucun commentaire:

Enregistrer un commentaire