CRM-6825 Performance issues on New Activity page

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.2.1, 3.2.2, 3.2.3
    • Fix Version/s: 3.3.beta
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      My client noticed a huge performance issue on this page civicrm/activity&reset=1&action=add&context=standalone
      I'm referring to "With Contact" autocomplete field .
      We are using Civi 3.2.1 but this applies also to 3.2.2 and 3.2.3.
      We have 9000 and more contacts and that simply was stlling

      Attaching a patch for it. I tested it an now works as expected.

        Attachments

        1. AJAX_patch09152010.patch
          0.9 kB
          Paolo Teodorani
        2. AJAX_patch09152010.patch
          0.5 kB
          Paolo Teodorani

          Activity

          [CRM-6825] Performance issues on New Activity page
          Paolo Teodorani added a comment -

          As suggested by Xavier this one also fixes the same issue in the "New Email" page

          xavier dutoit added a comment -

          3 additionnal options to improve:

          • set a minChar of 2
          • search on q% instead of %q%
          • array merge a search on sort_name & search on email instead of a single join (really got a 500 ms on a 10k db, no good at all)

          I'm sure we can agree on what's the right things to do and I can code it at Bristol

          X+

          Deepak Srivastava added a comment -

          Fixed in r30469.

          From additional options:
          #1 and #2 serve different purpose and therefore don't seem right fixes. We may require further discussion here.
          And #3 with "limit" and "inner join" doesn't seem expensive (assuming we talking about "With Contact" autocomplete field only).

          xavier dutoit added a comment -

          deepak: yes, it is expensive still (search on both the email and the name and join costs 500ms in a 8k DB), it seems that mysql can't properly use the joins.

          But 100% agree, that's another issue/discussion.

            People

            • Assignee:
              Deepak Srivastava
              Reporter:
              Paolo Teodorani

              Dates

              • Created:
                Updated:
                Resolved: