"Override Log Filters" affects apex runtime performance even if debug level is NONE.
Last updated 5 days ago ·Reference W-2754552 ·Reported By 12 users
In Review
Summary
- "Override Log Filters" strongly affects apex runtime performance even if debug level is NONE.
- Actual Result
If "Override Log Filters" is enabled, it affects apex runtime performance.
- Expected Result
Even if "Override Log Filters" is enabled, it should not affect apex runtime performance.
Repro
- Steps to reproduce
1. create the following Apex classes
---
public class checkLogOverride {
public static Long doTest() {
Long start = Datetime.Now().getTime();
for (Integer i=0; i < 1000000; i++) {
}
return (Datetime.Now().getTime() - start);
}
}
---
---
public class checkLogOverrideOther {
}
---
2. run the following Apex code by Developer Console or
---
Long t = checkLogOverride.doTest();
System.debug('Execution Time:' + t);
---
3. check USER_DEBUG log
You will see a value which is smaller than 500 with "Execution Time:".
This means checkLogOverride.doTest() took 500 milliseconds.
This is expected.
4. enable "Override Log Filters" for checkLogOverrideOther class
Please set NONE for all categories.
5. re-run Step 2
6. check USER_DEBUG log
You will see a value which is bigger than 5000 with "Execution Time:".
This means checkLogOverride.doTest() took 5 seconds.
This is unexpected.
Workaround
Don't enable "Override Log Filters"
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.