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

AvaTax Dependencies Use Too Much Memory #6

Open
dannyyu92 opened this issue Apr 1, 2017 · 1 comment
Open

AvaTax Dependencies Use Too Much Memory #6

dannyyu92 opened this issue Apr 1, 2017 · 1 comment

Comments

@dannyyu92
Copy link

dannyyu92 commented Apr 1, 2017

AvaTax depends on an outdated version of the RestClient gem, which depends on an outdated version of the Ruby mime-types gem. This version of mime-types uses ~11mb of memory on startup, which is a f*ck ton for a gem. It isn't possible to kill this dependency until AvaTax is updated to use a more up to date version of RestClient (latest is 2.0.1)

Using the derailed gem to analyze gem memory usage on app startup for a standard Rails app:

  delayed_job: 16.1055 MiB (Also required by: delayed/railtie, delayed_job_active_record)
    delayed/performable_mailer: 15.0273 MiB
      mail: 15.0156 MiB
        mime/types: 11.0117 MiB (Also required by: mime/types/columnar, /Users/danny/.rvm/gems/ruby-2.2.2/gems/rest-client-1.8.0/lib/restclient/request)
        mail/field: 1.4531 MiB
        mail/message: 0.7656 MiB
    delayed/worker: 0.5234 MiB

Newer versions of the mime-types gem do not use as much memory, as you can read here.

The current version of Avatax uses Restclient 1.7, which uses mime-types 2.0.

By upgrading to use Restclient 2.0.1, it will depend on mime-types 3.1, which will solve this memory bloat dependency issue.

@dannyyu92
Copy link
Author

Gonna send in a PR for this at some point

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

1 participant