You need to sign in to do that
Don't have an account?

Streamline Code to avoid "CPU Timeout" error
Our instance has a large amount of apex on a custom object and we continously run into the dreaded CPU Timeout error. Even after going to great lenghts to optimize our code by combining queries, pushing triggers to async methods, and even removing some logic we still manage to run into this error. We have also implemented a trigger framework similar to the one documented on Salesforce Dev blogs to try and cope with this. However, since we are using a trigger framework, there are a large number of class instantiations and method calls per transaction so I'm wondering if this is just adding to the problem.
My question is, what are some of the less obvious culprits that can contribute to the timeout error? And given those, what is the best way to compensate for those when writing triggers?
Any feedback is appreciated, Thanks.
My question is, what are some of the less obvious culprits that can contribute to the timeout error? And given those, what is the best way to compensate for those when writing triggers?
Any feedback is appreciated, Thanks.
You can refer to the below link.
https://help.salesforce.com/apex/HTViewSolution?id=000232681&language=en_US
If you have still any questions let me know.
If you got your answer then kindly mark this as solved.
Regards,
Scott Haleo
Hytechpro