function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Roshan 10Roshan 10 

CPU Time being consumed for sending the records to the Trigger which has no code in it

I am trying to update 1300 Accounts and we are getting CPU Time Limit Exceeded Error.

We have a custom Trigger (CT) and a managed package Trigger (MT)
I was trying to find the root cause and I have turned OFF the managed package code and all validation rules, workflows and process builder

So I only have the custom Trigger active but all the methods inside it are commented. I noticed that even though there is no code executing, 3000 ms of CPU time is consumed for update of 1300 Accounts

I tried to just query the 1300 Accounts and without any DML I do not see any CPU Time being consumed (which is as per documentation)

I logged a case with Salesforce but there are asking me to move the code to Batch APEX. 

If 30% of the CPU Time is consumed without any code, I will have very little room for any custom code (considering the workflows and validation rules)

Any thoughts on how to handle this

Thanks,
Roshan