Why is memory use important on a server?
If you are hosting many users on a site each user consumes memory for each task they perform. Some servers charge for the amount of ram that you use, and do charge for overage. By limiting the amount of memory you use, you can support more users on less memory, resulting in a faster performing site that costs less to operate.
The Test
Both installations (ikipress .7 & Wordpress 2.9.2) are on the same server. The same default hello world post is loaded, with the default themes. A few lines were added to the default footer in Wordpress to report memory usage.
wordpress page
29 queries. 0.215 seconds.
Memory: 14162 k
Peak: 14293 k
ikipress page:
queries: 19
Time: 0.0364 seconds
Memory: 2147 k
Peak: 2714 k
Conclusion – 1/4 the memory usage, 3x faster. You could host 7 ikipress blogs with the same amount of memory it takes to host 1 wordpress site.
Why does wordpress use so much memory?
After wading through countless wordpress php scripts, I was beginning to notice that many functions were being called over and over again, sometimes to only return a simple piece of data for one specific request. The problem was that a page doesn’t consist of only one, but many. Sometimes code its called, stored into variables, and recalled, and re-stored into another variable before it is printed to the screen (especially when handling theme’s.)
ikipress is different in that it uses SQL to perform much of the relationship processing between the dozen or so tables that post data is spread across. Instead of a several step process of obtaining a database value, storing it to an object, and storing that value to another object to have operations performed upon, and on and on, ikipress simply gets the values it needs, and inserts them into templates where the data is needed.
Differences
The main difference between the two pages is that the wordpress page handles comments. This difference alone would not cause an drastic increase in memory usage as complex ikipress pages use similar amounts of memory and have similar load times.
aiki (complex page)
queries: 26
Time: 0.0557 seconds
Memory: 2160 k
Peak: 2734 k
This page is ‘considered’ complex because it displays one post from three different categories on a single page.
ikipresswordpress
comparison
performance
