Change potentially slow log statements to subroutines
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenSRF |
Fix Released
|
Medium
|
Unassigned | ||
3.0 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
See LP1824181 https:/
This depends on the above change being merged.
The OpenSRF code was searched for potentially slow logging statements at log level info or above. We then changed those logging statements to be delayed execution subroutines. This is in reaction to LP1823338 where a slow debug logging statement was slowing down SIP checkins even though debug logging was not turned on.
Here is some pseudocode that shows what is being done here:
$log->debug("Some text " . $some->
would be changed to:
$log->debug(
With this change, an unnamed sub is passed to the OpenSRF logger module and it will not be executed unless the global logging level is set to debug or higher (the slow_method will not be called unless it is needed for that logging level).
********
If/when this is committed, please use delayed execution subroutines for any logging statements that could be slow in the future. It is recommend that any logging statements that do not consist entirely of quoted text and/or already available scalar variables use delayed execution subroutines.
********
At some point in the future if these changes are accepted, the same analysis and changes should be made for the Evergreen code.
This bug is related to LP1823338 https:/
Branch to follow.
Changed in opensrf: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
milestone: | none → 3.1.1 |
Changed in opensrf: | |
status: | Fix Committed → Fix Released |
OpenSRF branch is working/ user/jmerriam/ slow_logging_ use_subs: /git.evergreen- ils.org/ ?p=working/ OpenSRF. git;a=shortlog; h=refs/ heads/user/ jmerriam/ slow_logging_ use_subs
https:/