[geeklog-devel] Speeding Up Geeklog

Tom websitemaster at cogeco.net
Fri Jun 21 06:50:19 EDT 2013


Thanks Joe,

I will look into this (I have yet to add the caching function to stories and
have only reviewed that part of the story code). I didn't think of the CTL
for this type of work (something that is not really displayed).

I will still probably keep my existing code of the session variables for
those who don't enable the caching part on their sites. I am sure a few will
and the speed savings for any who have more than a few topics will be worth
it.

Tom

-----Original Message-----
From: geeklog-devel-bounces at lists.geeklog.net
[mailto:geeklog-devel-bounces at lists.geeklog.net] On Behalf Of Joe Mucchiello
Sent: June-20-13 4:41 PM
To: Geeklog Development
Subject: Re: [geeklog-devel] Speeding Up Geeklog

The CTL has CACHE_* functions just for this. You pass the array to the
function and it is written to the cache directory. You can then load it or
regenerate it based on how old it is. See glFusion's story/article handling
for examples. (And in the case of the TOPICS array, the decision to
regenerate it is basically NO unless someone is doing topic editing in the
admin screen. You would add the calls to regenerate the anonymous array, and
delete any individual arrays, to the topic save functions.)

Writing it to the gl_vars table still requires a database call. A file in a
cache directory is many times faster.

This was one of the primary purposes of CTL (perhaps even ahead of adding
template features to the ancient phplib template library). In 2008 I did a
lot of profile runs of Geeklog and the CACHE_ functions were there to cut
down of repeated and needless database accesses.

> To speed up Geeklog when it creates the $_TOPICS array I have created 
> a session variable to store the topic tree information for each user. 
> Topics hardly ever get updated so there is no point in creating the 
> tree from the db every single page load. This now only happens if a 
> topic gets created, updated or deleted (or the user security changes).
>
> This is working well but I can increase this further by allowing 
> anonymous users to share the topic tree (since it is the same for each 
> anonymous user).
>
> For this though I need the text database column data type. Does anyone 
> have a problem for the gl_vars table if I change the type for the 
> value column from varchar(128) to text?
>
> Thanks
>
> Tom
>
> _______________________________________________
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
> http://eight.pairlist.net/mailman/listinfo/geeklog-devel
>


_______________________________________________
geeklog-devel mailing list
geeklog-devel at lists.geeklog.net
http://eight.pairlist.net/mailman/listinfo/geeklog-devel




More information about the geeklog-devel mailing list