5 ms·
I had no idea rails/django are sooooo slow
by wasyl 12y ago
I had no idea rails/django are sooooo slow
- angersock 12y ago...which should tell you that speed really isn't as big a deal in web dev as some would have you believe. :)
- DannyBee 12y agoIt doesn't tell you that at all, since plenty of companies lose users/etc due to latency and other issues.
- angersock 12y ago[citation needed] I imagine that that issue is highly overrated for most companies.
- DannyBee 12y agoYou really want me to start citing research papers which show that if you improve latency, even if users don't "notice" it, you gain users? "web latency research user conversion rate" on google will turn up a ton. Heck, back in 2004, ten years ago, you only got two seconds: http://cba.unl.edu/research/articles/548/download.pdf http://cba.unl.edu/research/articles/548/download.pdf Now 1 second http://www.australianscience.com.au/research/google/34439.pdf http://www.australianscience.com.au/research/google/34439.pd... Even that causes losses: http://www.tagman.com/mdp-blog/2012/03/just-one-second-delay-in-page-load-can-cause-7-loss-in-customer-conversions/ http://www.tagman.com/mdp-blog/2012/03/just-one-second-delay... Google sees significant effects at 200ms: http://googleresearch.blogspot.com/2009/06/speed-matters.html http://googleresearch.blogspot.com/2009/06/speed-matters.htm... blah blah blah. Feel free to find things that say the opposite, i've never seen a study that says "users will choose the slower service, if it's 'better', they just don't give a crap". And sure there is a diminishing return, but if your latency times are 1s or greater for a web based service, you are almost 100% guaranteed to be losing users/conversions/etc.
- ChrisAntaki 12y agoFrom a psychological standpoint, a server that consistently responds quickly & doesn't break is easier to trust.
- WorldWideWayne 12y agoThere are a ton of ways to optimize web apps without needing the application server to be the fastest. Caching, reverse proxy, CDN, scale-out, etc.
- melling 12y agoIt's nice to see how fast Go is already. It'll probably be a couple years ago, but it should improve once they start working on the optimizing compiler. People have already demonstrated how Go can be used on the server: http://blog.iron.io/2013/03/how-we-went-from-30-servers-to-2-go.html http://blog.iron.io/2013/03/how-we-went-from-30-servers-to-2...
- Iftheshoefits 12y agoNo, it doesn't imply anything at all about whether speed is a big deal or not. At best one can conclude that concerns about performance aren't as important as other considerations which make Rails/Django more attractive. My opinion is that these other considerations are more along the lines of cost of labor and ease of learning than anything else.
- aliakhtar 12y agoActually, performance is quite important for scalability. A lot of sites written in Ruby / PHP have big scalability pains if they get popular. Twitter had to be re-written from Ruby to Java. Facebook had to completely rewrite PHP's compiler to make it close to a compiled / statically typed language. Joel Spolsky mentioned how StackOverflow only needed 3 servers to run it for a really long time, because it was coded in a compiled language. [1] [1] http://youtu.be/pPJf8KrvJXU?t=22m33s http://youtu.be/pPJf8KrvJXU?t=22m33s
- melling 12y agoHe says that at the 22m mark. And he says that currently he can fit his servers into 1 rack, while being a top 100 site.
- programminggeek 12y agoRails IS slow, but part of the reason it shows so poorly on that tests is a weird glitch in how unicorn and wrk interact. In my testing for the Ruby Web Benchmark Report (http://www.madebymarket.com/blog/dev/ruby-web-benchmark-report.html http://www.madebymarket.com/blog/dev/ruby-web-benchmark-repo...) I ran into pretty bizarre low performance on unicorn and wrk. TechEmpower uses Unicorn because it's the fastest MRI based rack server solution. In JRuby, you have a few more high performance options, and Torquebox 4 is nearly as fast as Go in Hello World. That being said, the only benchmark that matters is how your app performs on your tech stack. Anyone can write a slow DB query that ruins performance.
- ashk26_hn 12y agoThat may be true, but the main point that's being ignored by such statements should always be mentioned: Django and the like in scripting languages offer an easy to use and fast to implement way of getting an idea off the ground. Once you really go beyond millions of requests, it should be also possible to hire Java developers then to rewrite the app for scaling beyond the tipping point of scripting language apps.