Results 1 to 3 of 3

Thread: Slow Email DetailView opening

  1. #1
    andrius is offline Member
    Join Date
    Oct 2008
    Location
    Lithuania
    Posts
    37

    Default Slow Email DetailView opening

    I am using SugarCE 6.2.4 on LAMP stack (PHP 5.3.8).
    We have some emails archived in History subpanel in Opportunities tab (in Detail View). The problem is that when I click on the email link, the email is very slow to open. Especially if there is attachment in the email or email contains some East-Asia languages symbols.
    For example, normally rendering of Opportunity DetailView takes 0.3 s, while opening of email takes tens of seconds, sometimes even 60 seconds script execution time is exceeded!
    Even quite simple emails opening time is at least ten times longer than rendering of Opportunities DetailView. This is serious performance issue, I believe.

    Here is example of the query that’s being executed for email opening:

    SugarCRM Demos | Open Source Business & Social CRM - SugarCRM.

    When 60 seconds execution time is exceeded, in php error log there is message:

    PHP Fatal error: Maximum execution time of 60 seconds exceeded in sugarcrm\include\utils.php on line 1811.

    Simple check shows that function xss_check_pattern() causes the trouble, which in turn uses PHP function preg_match_all(). preg_match_all() is probably not good when one needs to check large strings, I believe.
    Is there any solution to this problem? If emails are already in the system, why they are checked every time when one tries to open them? Would it be better to check for xss only once, when they are archived?

  2. #2
    jebo is offline Junior Member
    Join Date
    Dec 2011
    Posts
    3

    Default Re: Slow Email DetailView opening

    hmm.. this could also apply to a problem that I have just posted (still waiting for getting my post approved).

    I am adding emails to a leads history through a logic hook with the email2send function from Sugar.... all mails that I create through that take forever until they open up.

    When I attach a text only email to the same lead's history it opens quickly.


    Cheers
    J

  3. #3
    andrius is offline Member
    Join Date
    Oct 2008
    Location
    Lithuania
    Posts
    37

    Default Re: Slow Email DetailView opening

    Here is my workaround:
    1. Get SugarCE 6.4.0RC1 distribution.
    2. Locate /include/utils.php file. Find function clean_xss($str, $cleanImg=true). This function is responsible for slow processing. It is changed in 6.4.0 version in comparison to 6.2.4, and processing speed is much better.
    3. Copy clean_xss function from 6.4.0RC1 distribution to 6.2.4 (file is the same - /include/utils.php.
    4. Enjoy much faster email openining!
    Best,
    Andrius

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. camapaign email very slow
    By marshalshamim in forum Help
    Replies: 1
    Last Post: 2011-11-04, 06:10 PM
  2. Email slow in 5.5.1 CE
    By mambotech in forum Help
    Replies: 3
    Last Post: 2010-04-24, 08:05 PM
  3. How to stop SideCreate from opening DetailView after saving?
    By jim.thornton in forum Developer Help
    Replies: 4
    Last Post: 2009-03-02, 10:19 AM
  4. Email is Slow Slow Slow
    By insyncnet in forum Help
    Replies: 4
    Last Post: 2008-10-03, 03:14 PM
  5. Errors when deleting email after opening
    By Convertec in forum Help
    Replies: 0
    Last Post: 2007-02-26, 06:40 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •