Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 6: How to disable Action Mailbox and Action Text from loading into Memory?

I want a new Rails 6 app without Action Mailbox or Action Text, so I create one with

rails new myapp --skip-action-mailbox --skip-action-text

I then remove them in application.rb

But when I run bundle exec derailed bundle:mem it shows that they are still there:

rails/all: 36.2539 MiB
    action_mailbox/engine: 13.5313 MiB

How can I remove them to save on memory?

like image 343
Jun Dalisay Avatar asked Oct 15 '20 02:10

Jun Dalisay


1 Answers

I have the same problem, even with my application.rb looking like this:

%w(
  action_controller/railtie
  action_view/railtie
  active_job/railtie
  sprockets/railtie
).each do |railtie|
  begin
    require railtie
  rescue LoadError
  end
end

bundle exec derailed bundle:mem still shows this:

TOP: 121.7656 MiB
  rails/all: 71.375 MiB
    action_mailbox/engine: 41.5 MiB
      action_mailbox: 41.4688 MiB
        action_mailbox/mail_ext: 41.4688 MiB
          action_mailbox/mail_ext/address_equality.rb: 39.6875 MiB
            mail/elements/address: 39.6875 MiB
              mail/parsers/address_lists_parser: 39.6094 MiB (Also required by: mail/parsers)
                mail/parsers: 7.5313 MiB
                  mail/parsers/received_parser: 5.1563 MiB
                  mail/parsers/envelope_from_parser: 1.4844 MiB
                  mail/parsers/message_ids_parser: 0.3281 MiB
          mail: 1.7344 MiB
            mail/field: 0.7813 MiB
like image 169
netwire Avatar answered Sep 18 '22 15:09

netwire