Housekeeper 1.12.1 - 100% CPU usage (a single core) in quiet period

If the Housekeeper is still not finished processing all the changes AND it is currently in its “quiet period” then it seems to be going into a “busy wait” around here: https://hg.orthanc-server.com/orthanc/file/tip/OrthancServer/Plugins/Samples/Housekeeper/Plugin.cpp#l700 .
We noticed this in multiple environments.

Shouldn’t we add some sleep (a minute maybe?) in that else block to avoid spinning the CPU unnecessarily?

Hi Andràs,

You are totally right !

I have just fixed it. Note, however, that I have introduced only a 1 sec sleep to allow Orthanc to exit quickly when requested.

Thanks a lot !

Alain.

1 Like