sfdc-trigger-framework
sfdc-trigger-framework copied to clipboard
Framework is not able to handle bulk dataset
Hi @kevinohara80 I am using the Trigger framework but stuck at a point where I have to deal with bulk data. The framework is consuming a lot of CPU time. The trigger doesn't have any complex logic it simply needs to set field value in before event for approx 4k records.
Can you please help me to get out of this exception.
Any help would be appreciated.
Thank You.
Can you please post your full trigger, and a log of it failing with 4K records?
I’ve used this with large data volume orgs and data imports of 18k records without error.
@kevinohara80 Please find the attached log file and trigger.
@vinodpalne Try this same experiment with a new custom object instead of Account. There isn't much happening in the log between the ~600ms jump in CPU. This makes me think the CPU is being used by SF processes (possibly building/checking indexes for a unique field), and not the framework.
@davehelgerson @kevinohara80 Hi Friends, Attached are logs with framework & without this trigger framework. hope this clarifies issue. FYI,, I tested this for 2000 Account UPDATE operation on anonymous apex execute. The beforeupdate and afterupdate() trigger methods are blank/empty. without_FW.log with_FW.log
attaching apex execution log for the same

Can you post your Trigger body?
Hi Kevin,
The trigger body has been uploaded to issue AccountTriggerHandler.txt https://github.com/kevinohara80/sfdc-trigger-framework/files/3883761/AccountTriggerHandler.txt along with the log.
Not sure if we can perform any optimisation in the framework itself? If client has heavy execution logic e.g. Crypto.generateAesKey() it's likely failure. Though, I do see benefits of your framework to handle recursion, bypass triggers etc when data volume is small ! Please let me know if this help/ if any additional questions. Thank you, Jayant
On Wed, Dec 4, 2019 at 6:45 PM kevinohara80 [email protected] wrote:
Can you post your Trigger body?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kevinohara80/sfdc-trigger-framework/issues/26?email_source=notifications&email_token=AB4MRP7N353J3OJEY4XMYCDQW73DTA5CNFSM4JQ6L6OKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF6CNRI#issuecomment-561784517, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4MRP2I5UJ6Y7BGQGES4WTQW73DTANCNFSM4JQ6L6OA .