-
-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logger uses lots of CPU time as entries are added #350
Comments
Thanks again @arbokrad for writing this up! Given that you're on an older version of the tool (v4.6.11 vs the latest version of v4.7.8), there are already some optimizations in place in newer releases.... but even the current version still fails to generate 1,000 log entries, so there's definitely more optimizations to be done. I'll include some of your tests when I work on some other optimizations in #311. |
See my comments in #351 - we're working on making extensive improvements to |
I confirmed today that this (and #351) are present in the the most recent release of nebula (4.13.4) |
@arbokrad and @jamessimone I wanted to get your thoughts on this issue - @jamessimone released |
I ran v4.13.5 in a scratch org the other day and confirmed that CPU usage is greatly reduced compared to previous versions. The example test class from the initial post passed successfully numerous times, so I kept bumping it until I could hit the new ceiling which appears to be somewhere between 1150-1200 calls to Since benchmark tests have already been added, maybe the right thing here is documenting a rough upper bound of logs per transaction and maybe even suggested/best practices for not going overboard on logging calls? There's always going to be a ceiling, knowing that ceiling and ways to work with it are really helpful. |
@arbokrad I agree, there will always be a ceiling, so I love your idea of documenting the upper bound + best practices. In addition to the super-helpful new heap size parameter record that @jamessimone added, there are a couple of other configuration options that can also be disabled to help increase the ceiling (by reducing queries, CPU time, heap size, etc.) - so it's probably worth documenting...
I'm going to keep this issue open until I've found a spot to document this info. Thanks for your feedback, and your help testing out |
Package Edition of Nebula Logger
Unlocked Package
Package Version of Nebula Logger
4.6.11
New Bug Summary
The logger appears to use a lot of CPU time as the number of times the logger is invoked grows:
Consider the following test class and measured CPU usage over multiple runs:
Visualized:
CPU usage appears to rise smoothly until it hits the hard cap of 15000 and starts failing.
The text was updated successfully, but these errors were encountered: