views:

34

answers:

2

Hello there,

I have developed a project using Symfony that on average takes circa 500ms to load one page on my laptop locally. I am worried. This laptop is at the minute only serving me, but what happens when this becomes a large scale project same size as facebook and mySpace?

Surely, Symfony cannot be suitable for a large scale project like youTube for a number of reasons?

Thank you for your time.

Marius

+3  A: 

Any framework you are using will have a penalty which you pay for the abstraction. Same thing happens when using an ORM, you benefit from the abstraction but you pay the cost of the overhead for the ORM to give you what it gives you.

In your situation, as my professor always told me: "Get your application to work and then worry about performance." Now this is not to say during development you should not be aware of performance penalties and algorithm efficiency but it is to say that this comes second to achieving your desired result and then you can go back through profile your code and find the places which cost the most and work on those.

Chris
"Get your application to work and then worry about performance." so THAT's why I have to rip my hair out and constantly think how on earth I can make the web applications to behave by using front-end proxies and stuff like that (I'm a sysadmin). To some point "make it work, optimize later" is a sensible tip, but if the framework you begin your work with is sluggish pig with a "Hello world" page taking half a second, how on earth you optimize it later? By altering the framework itself?
Janne Pikkarainen
@Janne, I doubt the framework is solely to blame; from my experience the *bulk of the blame* lies in the programmer's technique (or lack thereof) and ability to write efficient code (again, or lack thereof). If this guy's page is taking 1/2 a second to load; he's probably a very new programmer who used a lot of 'cut and paste' technique and even worse program flow.
Chris S
Symfony is not a sluggish pig with a "Hello World" page taking half a second I can vouch for this from experience.
Chris
+1  A: 

First of all, your laptop is doing both sides of the work here - both as client and server. While this shouldn't be noticeable on most machines, specifically a laptop may see bottlenecks in disk access (laptops usually have slower hard disks -> lower power consumption).

Second, and more importantly, you're probably looking at the site in development mode. Many frameworks, including Symfony, have modes like "devel[opment]" and "prod[uction]". Devel has extra logging, rebuilding autogenerated classes automatically, etc., while prod has a lower amount of logging, caching is enabled, and classes are only regenerated on operator's request.

Especially due to the second point, the framework will be slower in devel mode; try switching to production mode, and the difference should be apparent.

Piskvor