TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Warning: RoR is slow

21 pointsby keiretsualmost 18 years ago

9 comments

txalmost 18 years ago
How can you so blindly proclaim something like this? In a world of systems programming I got used to people posting stack traces with milliseconds attached to each function call, complaining about something <i>specific</i>. A good example would be GNU glibc's printf() function checking system locale on every call.<p>Have you ever done any programming before?<p>Your claim <i>Active Record is slow</i> sounds almost like <i>my computer is slow</i>. How do you know it was ActiveRecord? How did you benchmark? Was it even RoR? Maybe you had another process spinning in an endless loop in the background eating your CPU.
评论 #25814 未加载
keiretsualmost 18 years ago
First of all, i don't wish to try to start a flame war. Just want to share some of my experience with RoR.<p>RoR, to me, is the pinnacle of web programming orgasm. It's fun, it's fast, it's super productive. Hell, i never enjoyed web programming till i tried RoR.<p>Unfortunately, RoR is slow, or specifically ActiveRecord is slow. No matter how many machines you throw at your app, there is still a noticeable page loading time lag compared to a straightforward PHP script. People hate it. Yes. They do. Users will complain and the only way you can improve the loading time drastically is if you stop using ActiveRecord. But heck, half of the joy in using RoR is with ActiveRecord. Either that or you cache page fragments. But trust me, caching page fragments is not fun. You need to keep track of which fragments to invalidate based on which model actions. Multiply that with many models and you get the same PHP messiness.<p>So what's my point? My point is that i'm looking for a new FAST mini-framework to replace RoR. Any recommendations :)?
评论 #25656 未加载
评论 #25682 未加载
评论 #25688 未加载
评论 #25642 未加载
评论 #25658 未加载
评论 #25690 未加载
评论 #25643 未加载
评论 #25639 未加载
评论 #25636 未加载
评论 #25645 未加载
AFalmost 18 years ago
Unless you've really got a Ruby fetish, there's just not much of a reason to use it.<p>If you want a similar language with similar productivity, Python gives you that and speed, Unicode support at the language level, and lots of libraries.<p>And in web frameworks alone you've got Django, Pylons, Turbogears, web.py, etc. Django has the community and 'push' that Rails does in the Ruby world, and Pylons feels a lot like Rails. So what are you waiting for? Checking them out can't hurt anything.
评论 #25695 未加载
richcollinsalmost 18 years ago
Hrm most of the posts here show little understanding of Rails. Rendering, not AR is behind most complaints of "slowness". If you want to speed up rendering, limit the amount of redundant Javascript that gets generated, statically generate links, don't generate SQL (eager load) and cache where needed.
评论 #25766 未加载
dcancelalmost 18 years ago
I've moved to Django, huge performance difference. Also a simpler stack, apache + mod_python vs the nginx + mongrel or apache/lighttpd + fcgi or etc....<p>
count0almost 18 years ago
To be fair, the current implement of Ruby (1.8x) is slow because it does not compile source code to byte code and run in vm, which will be available in next version (2.0?). Python, on other hand, already use this for a long time.<p>So, just stick to it and wait if you like the beauty keyword "end" and dislike white space vs tab war.
jmcantrellalmost 18 years ago
Ruby and RoR, slow? This is a no-brainer. Ruby is slow as molasses and RoR is built upon Ruby. Hmmmmm....
评论 #25829 未加载
russalmost 18 years ago
Something to look into: I don't know if any of you guys went to RailsConf, but one of the goals of Rails 2.0 is to improve AR through the caching of repeated queries at the AR object level.
评论 #25820 未加载
sabatalmost 18 years ago
There are a lot of valuable comments here.<p>If I had to summarize what I think is the likely problem, I would say: look into pre-fetching where it makes sense. Databases are often troublesome beasts, and you have to do more management of the data than you would like.