Live data from Hacker News

Rails 3 Performance - Not Good Enough

blog.tstmedia.com

91–100 of 142 posts

Re: Rails 3 Performance - Not Good Enough

#91
post #61
post #51

Earlier quoted context omitted.

Well, this comment just comes across as sour grapes to me. You could be criticising any memory managed programming language. Old timers have been complaining about the kids not knowing about assembly, registers, punch cards, valves, etc since computers were invented. As for "incompetent design" - I don't know what you are on about. I think that Rails 3 is a frigging triumph of elegant, modular design. There are very…

You could be criticising any memory managed programming language. No, I'm explicitly criticizing Ruby. I've spent years in Python-land and the average code quality (and btw documentation standard) is much higher over there. Which is not to say Python doesn't have its own problems, but less so in this particular area. say that the average rubyist is much more concerned with good design than, say, your average java dev…

> Good design is a relative term. In ruby I frequently see it interpreted as: Pack as many layers of magic as possible, and then test that with as many layers of testing-frameworks as possible.

I have the same feeling sometimes. I wish the Ruby community would not be so concerned with magic and aesthetics, and target clarity.

Re: Rails 3 Performance - Not Good Enough

#92

The benchmark was done using REE. Out of curiousity, I tried it with MRI 1.8.7, MRI 1.9.2, and REE 1.8.7. Results are best out of three: user system total real rails3-1.9.2 2.240000 0.200000 2.440000 ( 3.127072) rails2-ree 2.530000 0.290000 2.820000 ( 3.578471) rails2-1.8.7 2.920000 0.210000 3.130000 ( 3.876215) rails3-ree 3.140000 0.250000 3.390000 ( 4.111465) rails3-1.8.7 3.560000 0.220000 3.780000 ( 4.505166) Of c…

1.9.2 has some slow startup problems with rails 3 -- I don't believe your benchmark measures startup time.

Not sure why this was downvoted.

In 1.9.2 (p180 and head), my rails 3 application starts in 26 seconds.

With REE 1.8.7, it starts in 8 seconds or so.

Re: Rails 3 Performance - Not Good Enough

#93
post #82

Earlier quoted context omitted.

"Starting a test or server on my dev machine takes 20-30 seconds. Particularly with tests, this is a huge problem for doing proper TDD" Long startup times or not, sounds like you should probably be using autotest or watchr. 20-30 seconds is not normal. Unless the app has a very large amount of code and dependencies, that sounds like an environment issue. "while most "Rubyists" would rather pollute the namespace" That…

autotest or watchr doesn't help startup times -- I'm not sure why you mentioned that here. I don't think the performance problems are affecting ALL applications - some people don't see any problems. I do think there is something wrong in Ruby or Rails that doesn't happen in all code paths.

"autotest or watchr doesn't help startup times -- I'm not sure why you mentioned that here."

If you use autotest or watchr you aren't starting up the environment very frequently.

Re: Rails 3 Performance - Not Good Enough

#94

Earlier quoted context omitted.

The problems here are manifesting on Ruby 1.8.7, but not 1.9.2. There have been big performance problems found with 1.8.7, for example in this issue: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/... What was originally a performance optimization on 1.9.2 caused a terrible slowdown on 1.8.7. It was reported and fixed within two days. Does that still fit into your "not giving a shit about performance" cr…

Ruby 1.9.2 has its own problems, especially with application startup. My application takes something like 45 seconds to boot on 1.9.2, on 1.8.7 REE it took 20 or so (which still sucks). http://stackoverflow.com/questions/4789248/rails-3-initializ... http://stackoverflow.com/questions/5516428/slow-deployment-f... http://www.ruby-forum.com/topic/1569988

Just ran some benchmarks on a larger rails 3 application (30k lines code, 55 gems).

In Ruby 1.9.2 (p180 and -head), the application starts 26 seconds. In REE 1.8.7, it takes 8 seconds.

Re: Rails 3 Performance - Not Good Enough

#95
post #34

Earlier quoted context omitted.

Judging by the comments on that commit and the comments in this HN post, I would say that many of the performance regressions are only happening under ruby 1.8.x. By this time, I wonder what the rails developers should spend their time with: making the framework better for people running the current version of the language or fixing performance problems due to shortcomings of the old version? If you can't upgrade to…

I'm finding it's not that people can't upgrade to 1.9.2, it's that many don't want to. I have a pretty decent-sized application running on REE and Rails 2.3.x. I've made my code fully 1.9.2 compatible. My specs take on average 3.5 times longer to run in 1.9.2. Profiling that shows that close to 60% of the time is spent in Kernel#require. Now, it's pretty common for people to say only profile in the production environ…

I have the same problems with 1.9.2.

Re: Rails 3 Performance - Not Good Enough

#96
post #87
post #82

Earlier quoted context omitted.

"Starting a test or server on my dev machine takes 20-30 seconds. Particularly with tests, this is a huge problem for doing proper TDD" Long startup times or not, sounds like you should probably be using autotest or watchr. 20-30 seconds is not normal. Unless the app has a very large amount of code and dependencies, that sounds like an environment issue. "while most "Rubyists" would rather pollute the namespace" That…

"Long startup times or not, sounds like you should probably be using autotest or watchr. 20-30 seconds is not normal. Unless the app has a massive amount of code and dependencies, that sounds like an environment issue." Autotest helps some, but 20-30 seconds is pretty standard fare. Maybe I use too many gems, but I don't think I should forgo reusing community code to reduce start times. Maybe it's unfair to make a ge…

"I don't think I should forgo reusing community code to reduce start times."

Using too many gems is an problem for a lot of reasons, though. You are introducing dependencies that you then need to manage and update, they often do more than you need to while being harder to maintain (you might end up with a bunch of forks in your gemfile as things get outdated), they are sometimes invasive and will require big rewrites to switch from.

"it seems people in the community get overly excited about something that saves 5 characters"

I agree (though I'd modify to to say "some people in the community"), I just find that I don't encounter it much when I'm following best practices myself.

Re: Rails 3 Performance - Not Good Enough

#97

Earlier quoted context omitted.

Ruby 1.9.2 has its own problems, especially with application startup. My application takes something like 45 seconds to boot on 1.9.2, on 1.8.7 REE it took 20 or so (which still sucks). http://stackoverflow.com/questions/4789248/rails-3-initializ... http://stackoverflow.com/questions/5516428/slow-deployment-f... http://www.ruby-forum.com/topic/1569988

Just ran some benchmarks on a larger rails 3 application (30k lines code, 55 gems). In Ruby 1.9.2 (p180 and -head), the application starts 26 seconds. In REE 1.8.7, it takes 8 seconds.

I have a very view heavy page. I'm running in development mode.

With 1.8.7 REE's garbage collection settings tuned, the page renders in two seconds.

With 1.9.2, the page renders in four seconds.

Re: Rails 3 Performance - Not Good Enough

#98
post #96
post #87

Earlier quoted context omitted.

"Long startup times or not, sounds like you should probably be using autotest or watchr. 20-30 seconds is not normal. Unless the app has a massive amount of code and dependencies, that sounds like an environment issue." Autotest helps some, but 20-30 seconds is pretty standard fare. Maybe I use too many gems, but I don't think I should forgo reusing community code to reduce start times. Maybe it's unfair to make a ge…

"I don't think I should forgo reusing community code to reduce start times." Using too many gems is an problem for a lot of reasons, though. You are introducing dependencies that you then need to manage and update, they often do more than you need to while being harder to maintain (you might end up with a bunch of forks in your gemfile as things get outdated), they are sometimes invasive and will require big rewrites…

True that gems often do more than I need, but should I? 1) Write my own authentication code 2) Write my own ical feed code (just added this in about 2 hours using ri_cal, which has way more features than I need) 3) Write my own code to inline css in email 4) Write my own Facebook API library 5) Write my own admin interface 6) Write my own SCSS and HAML processors 7) Write my own file attachment and processing code 8) Write my own background processing library 9) Write my own CSS/JS compression library

You get the point.

I use gems that save me tons of time. If not for gems, I would not be using Rails.

Re: Rails 3 Performance - Not Good Enough

#99
post #93

Earlier quoted context omitted.

autotest or watchr doesn't help startup times -- I'm not sure why you mentioned that here. I don't think the performance problems are affecting ALL applications - some people don't see any problems. I do think there is something wrong in Ruby or Rails that doesn't happen in all code paths.

"autotest or watchr doesn't help startup times -- I'm not sure why you mentioned that here." If you use autotest or watchr you aren't starting up the environment very frequently.

I'm not sure why you think that. Unless you use spork or something that preloads the rails environment then forks it on every test run, autotest/watchr will boot the whole rails environment from scratch on each run.

Re: Rails 3 Performance - Not Good Enough

#100
post #53

I've been a Rails dev for 5 years. I'm frequently considering leaving for another framework because of one thing: bootstrap time. Starting a test or server on my dev machine takes 20-30 seconds. Particularly with tests, this is a huge problem for doing proper TDD, particularly when you are trying to use tests to track down a bug. In that 20-30 seconds, I often console myself that we no longer need to print punch card…

I haven't been using Rails for nearly as long as you have. As a result, I thought the bootstrap time was something Rails developers just "put up with". I would have thought that someone else would have noticed this problem and done something about it...surprisingly I don't think many have. Django, by comparison, bootstraps the environment almost instantly. I have also been looking for an answer for how to deal with t…

You can slow down the startup time for Django if you have lots of installed apps and nested modules but it is still in the order of seconds rather than tens of seconds.
Post reply on HN