216 reputation
48
bio website
location
age 36
visits member for 3 years, 8 months
seen Oct 22 '12 at 17:26

Feb
27
comment Refactoring Wordpress to improve memory performance
@scribu I might be on to something. The WP_Object_Cache clones an object on every cache hit. Every single time you call get_post with post number as input parameter (and this is done about 15 times in my case), PHP creates yet another clone of your entire post object. This eventually leads to the post being cloned three different times in the globals, during the runtime there are many more clones. I am working on a fix.
Feb
27
revised Refactoring Wordpress to improve memory performance
Changed the title to be less pompous "rewriting from scratch" - "refactoring"
Feb
27
awarded  Commentator
Feb
27
comment Refactoring Wordpress to improve memory performance
I am working on it right now. I am trying to plot a map of objects in the memory, so I can see how much is used by what. Is there a tool that would take a memory dump and plot it?
Feb
27
revised Refactoring Wordpress to improve memory performance
Update the count of 20 copies, realizing reference counting is in place.
Feb
27
comment Refactoring Wordpress to improve memory performance
True, it is naive. Maybe I should have said "refactor" instead of "rewrite", then it sounds much better. Post updated.
Feb
27
awarded  Student
Feb
27
revised Refactoring Wordpress to improve memory performance
Wrote about dumping the defined variables.; added 11 characters in body; added 1 characters in body
Feb
26
comment Refactoring Wordpress to improve memory performance
@Rarst Thank you very much for your help. I do think that there is stuff to fix, but it would require changing the architecture of Wordpress to some completely different philosophy, and that is too much work.
Feb
26
comment Refactoring Wordpress to improve memory performance
@Rarst It should be fine. foxloft.com/files/mbala/cachegrind.out
Feb
26
revised Refactoring Wordpress to improve memory performance
added 402 characters in body
Feb
26
comment Refactoring Wordpress to improve memory performance
@Rarst Profiling screenshot was added.
Feb
26
awarded  Editor
Feb
26
revised Refactoring Wordpress to improve memory performance
Added profiler information
Feb
26
comment Refactoring Wordpress to improve memory performance
@Rarst I actually did benchmark the CPU usage and I cannot point finger on any specific place that causes the trouble. Similar to memory - it seems to be spread all over the place. However, my benchmarking might not be done in an optimal way - I use the XDebug profiler and Cachegrind - it is for instance quite hard to tease apart latency due to the database calls. I'd be grateful for pointers to better profiling techniques.
Feb
26
comment Running WordPress on low-end hardware/resources?
I have similar problems, and IMHO it is not the slow CPU or storage what is killing me - it is the architecture of WordPress that creates extremely complex environment from scratch on every page load, just so the plugins can cherry-pick tiny tidbits of functionality that is actually needed.
Feb
26
awarded  Supporter
Feb
26
comment Refactoring Wordpress to improve memory performance
I like that idea. I am not sure how much of this problem is due to I/O latencies, and how much is due to PHP slowly chewing on the data. Do you know of a way how to tell?
Feb
26
comment Refactoring Wordpress to improve memory performance
I am already using a cache, but I still have a few pages that are genuinely dynamic in nature (e.g. a shopping cart). And when the stars are not alligned correctly, the user can wait for 20 seconds - that is, granted, on GoDaddy, but even if not, I think it would be ~3 seconds at least. I simply cannot provide the kind of really snappy experience people are used to from Google.
Feb
25
asked Refactoring Wordpress to improve memory performance