[geeklog-devel] Speeding Up Geeklog

Joe Mucchiello joe at throwingdice.com
Thu Jun 20 16:41:07 EDT 2013


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
>





More information about the geeklog-devel mailing list