[imp] Performance Problems with imp/horde
Marc Bentje
noreply at htp-tel.de
Sat Sep 24 09:07:15 PDT 2005
hi IMP's ;)
I improved the 'patch' a little ... so that only the
horde.history won't get active ... 'cos to me it isnt clear
why any logged in user wan't to have the full history
maybe this reduces the chaos ;)
and at the moment ... it looks quite good
cheers
Marc
190 //
191 // ---file for debugging
192 //
193 // $fh=fopen('/var/log/debug/php_horde_debugging.log','a+') or
die($php_errormsg);
194 // $datadebugstring="Query Line 204";
195 // $datadebugstring=$datadebugstring."\n";
196 // fwrite($fh, $datadebugstring );
197
198 //
199 // ---group_uid -> exclude horde.history
200 //
201
202 if ( $this->_params['group'] != "horde.history" ) {
203
204 $query = sprintf('SELECT %s FROM %s WHERE (%s) AND
group_uid = %s',
205 $count ? 'COUNT(*)' : 'datatree_id,
datatree_name, datatree_parents, datatree_order',
206 $this->_params['table'],
207 $where,
208
$this->_db->quote($this->_params['group']));
209 }
210
211 // fwrite($fh, $query );
212 // fwrite($fh,"\n --- MARK --- \n");
213 // ---filehandle closing
214 // fclose($fh);
215 } else {
216 //
217 // ---file for debugging
218 //
219 // $fh=fopen('/var/log/debug/php_horde_debugging.log','a+') or
die($php_errormsg);
220 // $datadebugstring="Query Line 232";
221 // $datadebugstring=$datadebugstring."\n";
222 // fwrite($fh, $datadebugstring );
223 // fwrite($fh, $this->_params['group'] );
224 // fwrite($fh,"...\n");
225
226 //
227 // ---group_uid -> exclude horde.history
228 //
229
230 if ( $this->_params['group'] != "horde.history" ) {
231
232 $query = sprintf('SELECT %s FROM %s WHERE group_uid
= %s',
233 $count ? 'COUNT(*)' : 'datatree_id,
datatree_name, datatree_parents, datatree_order',
234 $this->_params['table'],
235
$this->_db->quote($this->_params['group']));
236 }
237
238 // fwrite($fh, $this->_params['group'] );
239 // fwrite($fh,"...\n");
240 // fwrite($fh, $query );
241 // fwrite($fh,"\n --- MARK --- \n");
242 // ---filehandle closing
243 // fclose($fh);
+
290 //
291 // ---file for debugging
292 //
293 // $fh=fopen('/var/log/debug/php_horde_debugging.log','a+') or
die($php_errormsg);
294 // $datadebugstring="Query Line 304";
295 // $datadebugstring=$datadebugstring."\n";
296 // fwrite($fh, $datadebugstring );
297
298 //
299 // ---group_uid -> exclude horde.history
300 //
301
302 if ( $this->_params['group'] != "horde.history" ) {
303
304 $query = sprintf('SELECT datatree_id, datatree_parents
FROM %s' .
305 ' WHERE %sgroup_uid = %s' .
306 ' ORDER BY datatree_id',
307 $this->_params['table'],
308 $in,
309
$this->_db->quote($this->_params['group']));
310 }
311
312 // fwrite($fh, $query );
313 // fwrite($fh,"\n --- MARK --- \n");
314 // ---filehandle closing
315 // fclose($fh);
+
340 //
341 // ---file for debugging
342 //
343 // $fh=fopen('/var/log/debug/php_horde_debugging.log','a+') or
die($php_errormsg);
344 // $datadebugstring="Query Line 354";
345 // $datadebugstring=$datadebugstring."\n";
346 // fwrite($fh, $datadebugstring );
347
348 //
349 // ---group_uid -> exclude horde.history
350 //
351
352 if ( $this->_params['group'] != "horde.history" ) {
353
354 $query = sprintf('SELECT datatree_id, datatree_name,
datatree_parents, datatree_order FROM %s' .
355 ' WHERE datatree_id IN (%s)'.
356 ' AND group_uid = %s ORDER BY
datatree_id',
357 $this->_params['table'],
358 implode(', ', $ids),
359
$this->_db->quote($this->_params['group']));
360 }
361 // fwrite($fh, $query );
362 // fwrite($fh,"\n --- MARK --- \n");
363 // ---filehandle closing
364 // fclose($fh);
365
Am Sa, den 24.09.2005 schrieb Julien MARCHAL um 16:52:
Hi,
> I haven't try your patch but I think if I make this, the share
feature
> (kronolith, mnemo and nag) will not work after.
> Someone could confirm this.
>
> Thanks,
>
> Marc Bentje <noreply at htp-tel.de> a écrit:
>
> > Hello Folks,
> >
> > I gain some performance problems using
> > horde / imp ... hmm the webmail-version ;)
> >
> > the performance steers down after a while ...
> >
> > nearly the same Problem like
> >
> > http://marc.theaimsgroup.com/?l=imp&m=112745110230786&w=2
> >
> > I've got
> >
> > ./lib/Horde/DataTree/sql.php: * $Horde:
> > framework/DataTree/DataTree/sql.php,v 1.156.2.2 2005/01/03 12:18:58
jan
> > Exp $
> >
> > a bit modified
> >
> > I commented out some of the full-table-scan 'features' of the
> > horde.history ..
> >
> > these are the lines
> >
> > 191 // $query = sprintf('SELECT %s FROM %s WHERE (%s)
> > AND group_uid = %s',
> > 192 // $count ? 'COUNT(*)' :
> > 'datatree_id, datatree_name, datatree_parents, datatree_order',
> > 193 // $this->_params['table'],
> > 194 // $where,
> > 195 //
> > $this->_db->quote($this->_params['group']));
> > 196 } else {
> > 197 // $query = sprintf('SELECT %s FROM %s WHERE
> > group_uid = %s',
> > 198 // $count ? 'COUNT(*)' :
> > 'datatree_id, datatree_name, datatree_parents, datatree_order',
> > 199 // $this->_params['table'],
> > 200 //
> > $this->_db->quote($this->_params['group']));
> > 201 }
> > 202
> >
> >
> > 247 // $query = sprintf('SELECT datatree_id,
> > datatree_parents FROM %s' .
> > 248 // ' WHERE %sgroup_uid = %s' .
> > 249 // ' ORDER BY datatree_id',
> > 250 // $this->_params['table'],
> > 251 // $in,
> > 252 //
> > $this->_db->quote($this->_params['group']));
> >
> >
> > 276
> > 277 //$query = sprintf('SELECT datatree_id,
datatree_name,
> > datatree_parents, datatree_order FROM %s' .
> > 278 //' WHERE datatree_id IN (%s)'.
> > 279 //' AND group_uid = %s ORDER BY
> > datatree_id ',
> > 280 //$this->_params['table'],
> > 281 //implode(', ', $ids),
> > 282
> > //$this->_db->quote($this->_params['group']));
> > 283
> >
> >
> > now ... the webmail runs properly ... without any obvious errors ...
> >
> > can someone tell me whatfor the 'history' is for ??
> >
> > by now thanks a lot ...
> >
> > Marc
> >
> >
> >
> > --
> > IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
> > Frequently Asked Questions: http://horde.org/faq/
> > To unsubscribe, mail: imp-unsubscribe at lists.horde.org
> >
>
>
More information about the imp
mailing list