-
Notifications
You must be signed in to change notification settings - Fork 109
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
Loading Mail Parsers takes a lot of memory #165
Comments
Suggestion: somehow enable the user to choose whether to optimize for speed (current version) or memory (proposed change). That is, instead of trying to please everyone or making these optimization decisions ahead of time. :-) My use case: A Rails app which only occasionally sends email and never receives it. But every instance pays the 30+ MB price, making it difficult to run efficiently on a PaaS, Heroku. |
Hi, sorry for not attending to this earlier! I like the idea, and would prefer the default behaviour to use the mail gem. |
If I understand the example correctly, the current implementation will only load the 30MB when the first validation is run, not on startup?! 🤔 |
Is this considered fixed based on mikel/mail#1623 ? |
See this line:
valid_email2/lib/valid_email2/address.rb
Line 26 in 3ff4c92
If you run this script you'll see that loading parsers from the Mail gem requires a LOT of memory:
Just throught you should know. Also since the call usually happens at run time instead of load time it's 30mb of memory use for every process.
Here's a discussion on the issue and a proposed (but not accepted) alternative
The text was updated successfully, but these errors were encountered: