Author Topic: Huge performance problem  (Read 19506 times)

Offline Akerbos

  • Jr. Member
  • **
  • Posts: 11
Re: Huge performance problem
« Reply #15 on: April 21, 2008, 10:03:49 AM »
On 0.1.1, I still observe long loading times. What are your experiences?

Offline blove57

  • Jr. Member
  • **
  • Posts: 18
Re: Huge performance problem
« Reply #16 on: April 21, 2008, 10:20:45 AM »
I agree that the 0.1 Stable version doesn't seem as stable as the previous versions. I think what's causing the instability is performance problems as everyone mentions here. Maybe something like runaway processes in the PHP. My experiencing is the same as everyone here and I'm using Windows / IIS (as opposed to Linux / Apache as most of you are).

An example of a performance problem that I can consistently replicate is sending emails with large attachments. My logs say:

[17-Apr-2008 18:43:51] PHP Fatal error: Maximum execution time of 120 seconds exceeded in C:\roundcube\program\lib\imap.inc on line 2455

Which is posting to code:
$sent = fwrite($fp, $message."\r\n");

I have another post that details this problem (http://roundcubeforum.net/forum/index.php?topic=3036.0). Maybe there are some PHP gurus that can help the open source cause. I think RoundCube needs some help? :-\

Offline blove57

  • Jr. Member
  • **
  • Posts: 18
Re: Huge performance problem
« Reply #17 on: April 21, 2008, 10:25:09 AM »
And by the way Akerbos, I've experienced the slow loading times too. I have about 10 users using RoundCube as their main email client and after I upgraded to the new version, most of them have complained about their frustrations with the "new" slow loading times.

Offline javiaw

  • Newbie
  • *
  • Posts: 7
Huge performance problem
« Reply #18 on: June 16, 2008, 07:55:37 AM »
Hi, I have the same problem loading a folder with huge amount of messages (around 80.000). I tried to change some IMAP (courier) settings and one of them improves the load (from 1 min to 5 sec aprox). This setting is the IMAP_DISABLETHREADSORT which in my daemon configuration (in /usr/lib/courier-imap/etc/imapd) is default setted as 0. If i change it to 1 the performance is much better.

There are two problems, tough. First, the server's workload rises over the average, but I'm not completely if this is due to the change.
The second is the messages sorting. As I have changes the variable the server does not do the sorting so it's up to the client. It seems that the client doesn't do it and messages appear with no logical order.

Do anyone know anything about it?

Offline jeffshead

  • Full Member
  • ***
  • Posts: 71
Huge performance problem
« Reply #19 on: September 01, 2008, 09:11:55 PM »
Quote from: Seanie;11122
This code reduces my 19 second wait down to just over 1 second. With more source trees (>19,000 files and directories), with the added code takes over 4 seconds, the original code takes ... more than 120 seconds, according to the error log (PHP max exe time exceeded). This might help you if you're doing IT on a shoestring, and using your mail server for other stuff too. There seem to be other 'issues' with the folder handling, but this mod does at least avoid punishing your server. If the idea behind the mod is attractive, I reckon it might be worth changing the code so it fetches (by name, using IMAP) only the folders listed as subscribed. I hope this is helpful, and not more easily done by setting a flag somewhere...

In program/steps/settings/manage_folders.inc, around line 203, first and last lines are original, and there's an extra close-curly-bracket to add before the foreach's close-curly-bracket:

  $level = count($foldersplit) - 1; /* <-- original line, insert following lines
      $parent_subscribed = TRUE;
      if ($level > 0)
      {
         $parentlevel = 0;
         $parent = $foldersplit[$parentlevel];
         while ($parentlevel < $level)
         {
            if(!in_array($parent, $a_subscribed))
            {
               $parent_subscribed = FALSE;
               break;
            }
            $parentlevel++;
            $parent = $parent . $delimiter . $foldersplit[$parentlevel];
         }
      }
      if ($parent_subscribed)
      {
         $display_folder = str_repeat('    ', $level) . rcube_charset_convert($foldersplit[$level], 'UTF-7');

Tried it, but it did not speed anything up. It takes about 8 seconds to login (sometimes 19) and about 8 seconds to go from folder to folder which is a lot slower than other webmail clients.