Python's logging module allows to omit the performance effect of string interpolation by supplying the arguments to the formatting string separately as arguments of the logging functions. In lib389, this development practice is disregarded, which means that even logging that does not really happen still affects the performance of the scripts.
On couple places, there's also logging calls which are trying to pass strings to formatting strings without formatting variable (basically self.log.info('something', 'this is bad') instead of self.log.info('something %s', 'this is bad'))
self.log.info('something', 'this is bad')
self.log.info('something %s', 'this is bad')
master
be sad
be happy
The attached patch fixes the occurences that I was able to find in semi-automatic manner. <img alt="0001-lib389-fix-logging.patch" src="/389-ds-base/issue/raw/files/70de106c31c7ca84a4039e5479a36f5f3913d4727520e92ed5b027cb68058b07-0001-lib389-fix-logging.patch" />
LGTM! You have my ack. :) I'll leave it for others to review, and I'll merge it a bit later then.
P.S. thank you for the contribution!
Metadata Update from @spichugi: - Custom field component adjusted to None - Custom field origin adjusted to None - Custom field reviewstatus adjusted to None - Custom field type adjusted to None - Custom field version adjusted to None
Happy to help :)
Metadata Update from @mreynolds: - Custom field reviewstatus adjusted to ack (was: None)
To ssh://pagure.io/389-ds-base.git 4206d27..df95edb master -> master
Metadata Update from @spichugi: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/2894
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: fixed)
Login to comment on this ticket.