Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Suli S
1,475 PointsIs Ruby on Rails slow?
Hi
Why this forum is a little bit slow? Is it because it was built using Ruby on Rails? I have heard that sites built using Ruby on Rails are slower than sites built using ASP.NET or PHP. Is this true? What is the reason behind this?
2 Answers
Kevin Korte
28,149 PointsLearn to use the development tools in the browser. I use chrome for this, and if you are viewing the network tab and refresh a page, you can view everything that happens. You can see all of the server request, all of the files being pulled in, the size of the file and whether it was catched, size of the file, the time and latency, it will even show you when the Load event and the DOMContentLoaded event fired, on a timeline.
It's the best way to see what's going on with a site and how it's speed or performance is being handled. Again, it will have very little to do with the language used. So little I wouldn't even worry about it.
You probably know this, but the resources used, and their size does not correlate with the language used. There are lots of things that can be done server language independent that can speed up or slow down a site.
And than you have database speeds, and picking the right database for what you need it to do and perform well doing it.
Kevin Korte
28,149 PointsSpeed has very little to do with the language used. It has everything to do with the cleanliness of code, how well it's written, resources used, needed, pulled, cached or not, how many scripts, css files, images, or other dynamic content need, etc.
Git hub is RoR. Twitter started as RoR but some of the backend stuff went to ScalaI - seems to be quick. Youtube is phyton. Facebook is/was written in PHP, but I think is compiled into something else. (edit* quick search looks like FB is using C, C++, and Java in addition to PHP) As you can see, major sites used all different types of languages.
The fastest language (performance wise) is the language you understand best.
Suli S
1,475 PointsThat's true but most of the sites built in RoR I feel of their slowness I don't know why except for Git hub and this is maybe because of the high resources it has!
Suli S
1,475 PointsSuli S
1,475 PointsIt would be helpful if you give me any other RoR good example rather than Git hub.
Kevin Korte
28,149 PointsKevin Korte
28,149 PointsFrom RoR's own site
+Twitter +Groupon +Shopify +Yellowpages
And some more on a quick search +Hulu +Slideshare +Funny or Die
If you're going to build a huge web app, there might be some reason to which language to use. If you use firefox, you should install an extension called "Wappalyzer". It will show the icons of the web technologies used on whatever site you are currently on. It's a pretty reliable way to see if the site is PHP, RoR, if it has a CMS, etc.
If you're coding up a little one person dynamic website, again go with the server side language you are more comfortable with, and spend the majority of your time minifying and simplifying CSS, JS, serving images that are sized correctly (not just scaled with CSS; don't send a 2mb photo to the browser to be scaled down to 56px). All of these will be more important, IMO.
Suli S
1,475 PointsSuli S
1,475 PointsWow that extension is great. First time I know about it! I was always testing that with sites like builtwith.com
Kevin Korte
28,149 PointsKevin Korte
28,149 PointsI started with builtwith too, and while it's a good site, this is fast and easy, and pretty complete. It doesn't tell you everything on every site, but it's still pretty good.
I'm going to be diving into RoR myself here soon, as I have a web project I plan on doing after I wrap up a few wordpress sites.
I would encourage you to at least learn RoR, as well as PHP, and even Python. If you learn the languages somewhat, you'll be able to get a better feel for whats best for you.
But it doesn't help in the meantime to see who is using what languages.
One more thing--you said you noticed this forum was slow, and it sounds like you are also using Firefox. I noticed the same thing, the forum was slow on Firefox. I now use Firefox for most of my browsing, but I use Google Chrome here and have much faster and better results.
I'm not sure what the issue was/is, but there definitely was something going on with this forum and firefox.
Kevin Korte
28,149 PointsKevin Korte
28,149 Points**But it DOES help in the meantime to see who is using what languages.