Reputation: 33683
I have 3 PHP web based applications that I'm evaluating for memory usage. One is a Wordpress website with minimal extensions/plugins, another is a social networking application built with Code Igniter, and another is a project management system built from scratch (BFS).
The average memory used to render a page for each of these applications are as follows:
My reaction and questions to the numbers are:
a) Wow, wordpress uses 433% more memory than the CI project. And I haven't even installed any fancy WP plugins yet. Is WP considered a memory hog? If so, should I be concerned about this website sitting on the same server as some business critical web applications?
b) Nice, the BFS project is in the same ball park as the code igniter project. I had some ideas on how to optimize memory usage in the BFS project. I ran some experiments against the idea and was able to improve memory usage by 25% (thus, yielding 3mb/page load, just like CI prj). Refactoring the entire system will take 1-2 weeks worth of work. My questions on this matter are:
i) Is it worth it to optimize for 25% memory efficiency? Keep in mind WP uses 433% more memory and while doing less than the BFS and CI project
ii) if yes to i), is TODAY the day to do it? This BFS project is in start up phase with ambitious plans for new features. Do I risk incurring dangerous amounts of technical debt going forward if I don't optimize today?
Ok, so those are my questions
Upvotes: 0
Views: 237
Reputation: 6346
I agree with milofaris, you could also try eAcclerator or Memcache. They're both great for PHP in optimizing web apps.
Here's a great link: http://www.haughin.com/2008/02/13/optimizing-and-scaling-your-codeigniter-application/
My CodeIgniter project used to run 5MB. After using eAcclerator, it now runs less than 2MB.
Upvotes: 0
Reputation: 696
Wordpress is not considered a memory hog and can be optimized quite well if well designed plug ins are used along with using some sort of caching mechanism. The benefits you get with that is a robust system that you can take to the market quicker. CI is more like a traditional framework and is very light weight so that is nice also but again you can't just use a plugin and get you the functionality you desire. I would surely stick with code Igniter since it is "optimized" to begin again. 1-2 weeks of time is about 80 hours at whatever hourly rate you deem worthy for yourself. Also remember that being ambitious does not necessarily mean results.
Upvotes: 1