Change potentially slow log statements to subroutines
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
See OpenSRF LP#1824181 https:/
This depends on the above change which was released in OpenSRF 3.0.3 and 3.1.1.
The Evergreen 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.
Here is some pseudocode that shows what is being done here:
$log->debug("Some text " . $some->
would be changed to:
$log->debug(
In the example change above, 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 the global logging level).
********
If/when this is committed, please use delayed execution subroutines in the future for any logging statements that could be slow. 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.
********
Branch to follow.
tags: | added: pullrequest |
tags: | added: performance |
Changed in evergreen: | |
milestone: | none → 3.next |
Changed in evergreen: | |
assignee: | nobody → Bill Erickson (berick) |
Evergreen branch is working/ user/jmerriam/ use_log_ subs: https:/ /git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ jmerriam/ use_log_ subs