You need to sign in to do that
Don't have an account?
Zuinglio Lopes Ribeiro Júnior
Does System.debug count against Salesforce execution limits?
Hello folks,
Few time ago I was debugging a code and I noticed that using System.debug to put a Map in the log increased the CPU time.
That happened because I was debugging or even when I am not it count against Salesforce limits?
Regards
Few time ago I was debugging a code and I noticed that using System.debug to put a Map in the log increased the CPU time.
That happened because I was debugging or even when I am not it count against Salesforce limits?
Regards
One way to avoid this is to make the debug statements configurable, such as:
where DEBUGGING is a static variable or generated from a custom setting. This would allow you turn off debugging in production, which can save a considerable amount of time if you are producing a lot of debug.
There's some analysis from my fellow MVP Simon Lawrence over on stack exchanges, which shows how much of a difference this can make:
http://salesforce.stackexchange.com/questions/41063/writing-too-much-to-debug-log-would-affect-apex-trigger-or-visualforce-page-perf