[pLog-svn] Improving performance of summary.php

Mark Wu markplace at gmail.com
Sun Nov 27 15:22:23 GMT 2005


For the way 2, I think it also do-able, but need some db-change and
script-change.

1. we need some new tables tables, plog_summary_mostread,
plog_summary_mostcomment, plog_summary_newestblog, plog_summary_newpost
    -- Maybe we will have plog_summary_randomblog,  plog_summary_randompost,
post_summary_newestalbum, post_summary_randomalbum in some day future
2. We need to add some scripts in addcomment, addblog, addpost and addalbum
actions and compare to the tables above and decide updates those tables or
not ...

With the both template and db-cache, I think we can handle the loading of
summary page 

** As I understanding, this way is more real-time but will take more
cpu/mysql/io loading ..

Mark

-----Original Message-----
From: plog-svn-bounces at devel.lifetype.net
[mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of Oscar Renalias
Sent: Sunday, November 27, 2005 9:24 PM
To: plog-svn at devel.lifetype.net
Subject: [pLog-svn] Improving performance of summary.php

Let's face it, summary.php is still slow :-)

I was thinking about this and I found two possible solutions (that are not
mutually exclusive, by the way):

- Somebody logged a feature request in mantis asking for summary templates
that are not removed when a change in data occurs, but instead, that expire
after a certain period of time. Something like
15 min or so. This would confuse some users but we would only need to
generate the front page 4 times per hour, instead of many more in case of
busy sites.

- Instead of calculating the lists of most recent and commented articles,
blogs, etc every time we generate the front page of summary.php, we should
calculate these lists every time somebody posts, updates or deletes an
article and then  store the id of these articles and blogs in some temporary
table. This would slow down operations with blog articles but should
theoretically speed up loading summary.php.

I haven't tested any of these approaches yet. But does anyone have any
comments or further ideas?

Oscar
_______________________________________________
pLog-svn mailing list
pLog-svn at devel.lifetype.net
http://devel.plogworld.net/mailman/listinfo/plog-svn




More information about the pLog-svn mailing list