views:

854

answers:

6

Hypothetically, if I were to build the same app using a few popular/similar frameworks, say PHP(cakePHP|Zend), Django, and Rails, should the memory consumption of each be roughly the same?

Also, I'm sure many have evaluated or used each and would be interested in which you settled on and why?

+2  A: 

It is hard to efficiently say, I would say that PHP frameworks will have mostly a similar footprint, which is typically less than other frameworks such as Rails and Django. But it depends what you include as rails, such as mongrel (rails server proxy). Overall it depends on your code as well however PHP will most of the time give an easier time on the server. (Without any language Bias, I use both PHP and Rails)

stuartloxton
+6  A: 

No, it will absolutely vary wildly from one framework to another.

That said, in most cases the memory footprint of the framework is not the determining factor in site performance nor in selection of a framework. It's usually more a matter of using the right tool for the job, since each framework has its own strengths and weaknesses.

Max
+1  A: 

The only one of those frameworks I have used is CakePHP. I found that it's not to bad footprint wise however it is a lot more heavy that normal PHP without using a framework obviously but can be a good trade off. A good comparison of some of the most popular PHP frameworks can be found at http://www.avnetlabs.com/php/php-framework-comparison-benchmarks.

Mark Davidson
+1  A: 

Memory is cheap these days. Go with what will make your development easiest (which is usually what your team knows best).

But... In my experience, Django isn't terribly memory hungry. I've run it on my shared host with less than 100 MB of RAM. But my experience is sheerly anecdotal. YMMV. If you go with Django, here are some tips to keep memory usage down.

EDIT: And don't go with zope if memory footprint is important to you.

Jason Baker
+2  A: 

Just for getting some perspective let me report a real case memory consumption using a Smalltalk web framework AIDA/Web.

For running 40+ websites on a single Smalltalk image on a single server it currently consumes 330MB of memory.

Janko Mivšek
+4  A: 

Code with whatever framework you like best. Then pray your app is popular enough to cause memory problems. We should all be so lucky.

chipotle_warrior