Live data from Hacker News

Your Pages Will Load Faster With Rails

engineyard.com

31–35 of 35 posts

Re: Your Pages Will Load Faster With Rails

#32

Earlier quoted context omitted.

The title is misleading though because it makes it sound as if all you need to do to make your pages load faster is switch to Rails. Whether or not Rails makes it easy to implement these suggests or if another framework makes it harder/easier is another discussion.

Yes, the title is very misleading. As for the op protesting its because Rails makes its easy to do those things then surely that should be reflected in the name of submission - 'Built in Rails functionality helps page load' I would also say the title is very presumptuous; claiming to make all pages load faster is an unachievable goal & clearly an exaggeration.

claiming to make all pages load faster is an unachievable goal & clearly an exaggeration.

No, it is not. This is a claim which is testable and measurable, and for reasonable assumptions, you can predictably, measurably, and in a reproducible fashion improve page load times by implementing the YSlow recommendations.

If you have the following line of code in application.rhtml:

javascript_tag "prototype", "scriptaculous", "shopping-cart", "color-picker", "mysite-functions"

and you add these 16 characters

, :cache => true

then every page on your site now loads faster.

P.S. Explanation for non-Rails users: the above code causes the five specified Javascript files to be concatenated into "all.js" the first time any page on the Rails site is rendered, and all pages load all.js rather than loading the five Javascript files. This cuts the overhead of four HTTP request/response cycles from the page. It gives an obvious, measurable impact to page load times, and plays well with another braindead easy optimization "set your HTTP server to gzip outgoing textual content (including Javascript)".

Re: Your Pages Will Load Faster With Rails

#33
post #3

Wycats is a great guy and contributes a ton to the Ruby community, but I have to say...there's really not much here that's new or insightful. Set your headers, gzip content, and split assets across domains, yes, but - "Your pages will load faster with Rails"? Somehow the headline doesn't seem appropriate.

Yehuda already replied, but allow me to summarize: the point is that Rails will do these things automatically, without developers having to think about them. This means that, unless you are doing all the things Rails 3 will give you for free, it's true that "your pages will load faster with Rails"---thus fulfilling the titular promise.

Re: Your Pages Will Load Faster With Rails

#35
post #32

Earlier quoted context omitted.

Yes, the title is very misleading. As for the op protesting its because Rails makes its easy to do those things then surely that should be reflected in the name of submission - 'Built in Rails functionality helps page load' I would also say the title is very presumptuous; claiming to make all pages load faster is an unachievable goal & clearly an exaggeration.

claiming to make all pages load faster is an unachievable goal & clearly an exaggeration. No, it is not. This is a claim which is testable and measurable, and for reasonable assumptions, you can predictably, measurably, and in a reproducible fashion improve page load times by implementing the YSlow recommendations. If you have the following line of code in application.rhtml: javascript_tag "prototype", "scriptaculous…

What i'm trying to get over here is that if your site already uses all of these techniques and more while running on something faster than rails then you will not make the page faster, and thats what the title claims.
Post reply on HN