[kronolith] kronolith - performance and memory usage

Oliver Kuhl okuhl at netcologne.de
Wed Mar 5 11:36:13 PST 2003


Hi!

> > Mar 04 22:58:54 HORDE [debug] [kronolith] SQL Query by
> > Category_sql::getCategoryData(): SELECT category_data FROM horde_categories
> > WHERE category_id = 491 [on line 502 of
> > "/usr/local/apache/htdocs/horde/lib/Category/sql.php"]
I took a look at this file and patched it. Now only the currently logged in 
users category is loaded. It seems to work so far for me. It's quite dirty, 
because I directly get the userid out of the $GLOBALS. Maybe anyone has a hint 
which function to call and what libs to load to make this one clean.

Here it comes:

# diff sql.php.old sql.php 
127c127
<                              ' WHERE group_uid = %s',
---
>                              ' WHERE group_uid = %s AND category_name = %s',
129,130c129,131
<                              $this->_db->quote($this->_params['group'])
<                         );
---
>                              $this->_db->quote($this->_params['group']),
>                              $GLOBALS["HTTP_SESSION_VARS"]["__auth"]["userID"]
>                       );
Here I think it would be easy to set a configuration-option. But otherwise the 
better place would be somewhere inside kronolith, which was actually to complex 
for me.

I'll test it a little bit more...

Gruss,
   Ollie.


More information about the kronolith mailing list