Page MenuHomePhabricator

Saving a contact is very slow, and broken
Closed, ResolvedPublic1 Estimated Story Points

Description

Saving a contact is triggering some dedupe code. Turn that off. It takes several minutes to save a contact, at which point a crazy notification tells you that a hundred other people have the same name as you.

See image:

dedupe_warning.png (272×936 px, 48 KB)

Sadly, this "error" prevents me from saving the contact. I can't tell if there are more errors below the fold, because the scroll bar in the notification doesn't go all the way to the bottom.

There's a chance the failure is related to the custom nonnumeric phone number function (that should never be executed).

Event Timeline

awight raised the priority of this task from to Unbreak Now!.
awight updated the task description. (Show Details)
awight added subscribers: CaitVirtue, gerritbot, awight and 3 others.
awight renamed this task from Saving a contact is very slow to Saving a contact is very slow, and broken.Oct 30 2015, 7:16 AM
awight updated the task description. (Show Details)
awight set Security to None.

Trying simply disabling "Check for Similar Contacts" in the Display Preferences admin console.

Change 249972 had a related patch set uploaded (by Awight):
Add a setting to disable the dedupe on edit

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

Workaround: I'm switching the "Supervised" rules to "General" for each contact type, so they aren't selectable by the contact save dedupe. ----- That didn't work at all, it throws exceptions on save if there is no supervised rule.

I sped up the individual supervised rule, at least, by having it match on exact email, so the time spent is negligible.

However, that still prevents saving when an email matches. I'll leave that alone for now to see if people like it. Otherwise, we can set the supervised rule to never match (threshold >> weights).

Change 249972 merged by Ejegg:
Add a setting to disable the dedupe on edit

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

Just so you know, the original error doesn't sound too different from the functionality in the previous version of Civi: saving a contact is a multi-minute process, brings up a huge list of potentially matching contact records, and you have to find the "skip this step" or "Save matching contact" button to proceed. Which takes some more time.

I think we should hold a ticket open to assess this from a longer term point of view under less urgency. If the setting makes sense we want to upstream it, but I'm not clear that it was the fix in the end anyway

@CaitVirtue @LeanneS
Please comment here and lemme know if my changes to the dedupe rules are messing with your workflow, and whether saving a contact is fast now. It shouldn't take more than a few seconds.

@awight, not sure what I should test here, can you suggest something?

@CaitVirtue
Try creating a new contact and saving it. Individual, Organization, and Household contacts will all behave slightly differently, so it's worth creating one of each.

If you're too busy, don't worry about this! We can just reopen the bug if it turns out to still be a thing.

Change 252466 had a related patch set uploaded (by Eileen):
Add a setting to disable the dedupe on edit

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

Change 252466 merged by Eileen:
Add a setting to disable the dedupe on edit

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

Change 285779 had a related patch set uploaded (by Eileen):
Add a setting to disable the dedupe on edit

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

Change 285779 merged by Eileen:
Add a setting to disable the dedupe on edit

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