Make auditor only run json.dumps if we're going to dump state to file

Bug #2008934 reported by Mark Kirkwood
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
New
Undecided
Unassigned

Bug Description

Commit 77f5b201248c0684d87289540d3f94873f5c5e38 introduced logic to throttle writing the status file to once per minute. However, it still ran json.dumps and potentially utf8 conversion on every call. We have identified that this uses a lot of CPU, only to throw the string away.

This change only calls json.dumps if we're going to write the state to file.

Revision history for this message
Mark Kirkwood (mark-kirkwood) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.