开发者

Are there any issues(performance or others) if we require/include any gem in rails app and just use its 2%

开发者 https://www.devze.com 2023-03-21 13:11 出处:网络
For instance, rmagick, we use it just for making thumbnails which, say we only make use of 2% of that gem/lib.

For instance, rmagick, we use it just for making thumbnails which, say we only make use of 2% of that gem/lib.

Will it make sense not to use rmagick just for the purpose of making thumbnails and call imag开发者_运维知识库e-magic apis from sh script, and hence not to have too many gems specified in Gemfile, less dependency etc?

Want to know experts opinions.


The main disadvantage is more memory use (especially in this case because rmagick has a reputation for memory leaking). I suggest the mini_magick gem as a smaller replacement.

There's also the possibility that a badly written gem might break something else in your app.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号