views:

33

answers:

3

What impact, if any, does having A LOT of gems have on the performance of your Rails app?

A: 

no impact on performance. It's just a problem of memory. You memory can be very big with so much gem and if you really use it.

shingara
A: 

Actually it depends on the gem. When the gem automatically hooks up in the rails app and will be called with every request on the app then it will slow down your app a little. But in the average case you won't notice it. For sure it all adds up.

David
A: 

I would say the biggest impact is when your rails app starts up, as the gems are all loaded into memory. If you have lots of gems loaded, chances are you'll also have a lot of code loaded that your app doesn't use, so one way to cut down on the memory usage is to take advantage of copy-on-write support in the linux kernel. One way to do this is to use ree and unicorn, as github did

This is just an assumption though. You should always profile your app when dealing with timing and memory questions. It can make a really useful blog post.

Ben Taitelbaum