开发者

How to deal with resource usage of Rails? Is it good to hack everything?

Compared to Django, many people told me Rails will load everything that make it resource hungry.开发者_JAVA百科 Rails has lots of magic.

How to deal with the resource usage so that the performance and resource usage comparable to other lightweight Ruby framework? And is it good idea to hack everything to achieve this?

In PHP, I use Drupal because it has many modules and I hack nearly everything in core and modules to reduce the resource usage. In Python, Pylons is easier than Django, but I dont have much time to code myself. Rails has more tools, but the resource usage is the question.


Use the latest and greatest versions to get performance benefits.

Try using Rubinius instead of MRI Ruby. Try using Ruby v1.9.2 instead of Ruby v1.8.7. Try to use Rails v3.0.x or v3.1.

@meagar is correct that you shouldn't "hack" anything. You should do the exact opposite, which is called doing it the "Rails Way".

One mantra of Rails is "Convention over Configuration". If you find yourself hacking, you are probably doing it wrong.


You shouldn't have to "hack" anything. Leave it alone and let it do its job. If performance is a concern, throw some caching at it. Worry about it when it becomes a problem, which it likely won't.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜