progressivetech / net.ourpowerbase.sumfields

The Summary Fields extension creates read-only custom data fields that extend Contact and are automatically populated with up-to-date totals such as total lifetime contributions, last contribution amount, last attended event, etc.
Other
8 stars 29 forks source link

SummaryFields on large scale site installations #29

Closed VangelisP closed 6 years ago

VangelisP commented 6 years ago

On large scale sites and under specific circumstances, MySQL triggers are causing slowdown to importation/exportation functions of eg. Contributions.

I made a PR that adds an option in the settings that allows users to select how SummaryFields works.

Technically, once the option is selected, I am always forcing the scheduled job to be re-scheduled upon completion. Also, I am intercepting the trigger rebuild function and if the option is 'remove triggers', i'm just bailing out.

One important thing is that the scheduled job SumFields.Gendata should be run on each cron.

I've tested this modification on 2 big clients and looks good.

VangelisP commented 6 years ago

Hello @jmcclelland , is there a plan for a new SummaryFields release tag now that the new changes are being merged?

jmcclelland commented 6 years ago

Thanks for the nudge. I found one more small bug and have now just tagged a new release. It should show up in CiviCRM's extension repo tomorrow.