Page MenuHomePhabricator

slow loading of contribution tab when many contributions for a contact
Closed, ResolvedPublic2 Estimated Story Points

Event Timeline

On staging I got a 50% speed improvement on loading the contribution tab for Anonymous Contact (and other slow contacts) by simply removing some redundant query calls

We've deployed removing the redundant calls (noted above) - I'm trying to fix the query so it doesn't use an index merge. However, there is some cruft/nastiness in the query to clean up first - I have added https://github.com/civicrm/civicrm-core/pull/13319 to address that & will try to get relevant upstream review

Change 491383 had a related patch set uploaded (by Eileen; owner: Eileen):
[wikimedia/fundraising/crm/civicrm@master] Remove mode & median calculations

https://gerrit.wikimedia.org/r/491383

The patch I just added shaves 24 seconds off the contribution tab load time. I think when we started it was over a minute - this goes from 33 seconds to 9 to load the contribution listing

Screenshot 2019-02-19 11.43.52.png (49×667 px, 24 KB)

after

Screenshot 2019-02-19 11.42.17.png (67×729 px, 30 KB)

Search for Benevity in Jan (no rows returned as none on staging)
Before 1 min 24
After 10 seconds

Checks in Jan (staging data, only 2k)
before 1 min 30 sec
After 1min 8sec

Change 491383 merged by jenkins-bot:
[wikimedia/fundraising/crm/civicrm@master] Remove mode & median calculations

https://gerrit.wikimedia.org/r/491383

@MBeat33 @NNichols @LeanneS I deployed a patch today that takes 20 sec off the time to load the contribution tab for anonymous contact and 1 minute off some contribution searches - hopefully you / engage notice the difference :-)

I've deployed 2 fixes against this - one that stopped queries running twice & one which removed the median & mean. I think we got from about a minute to about 20 seconds on anonymous contact tab load. These fixes both also affect all contribution searches - e.g a minute off an empty search for benevity payments.

There is another fix that I have gotten merged upstream that will speed up things a little more but I'm going to wait until that flows through in a civi update rather than put in our review process