Avoid the sleep(1) in daemons/controld/controld_schedulerd.c:do_pe_invoke_callback(). The easiest way would be a mainloop timer.
If the controller somehow gets in a loop requesting the CIB, the sleeps will be significant and can even get it killed by pacemakerd for being unresponsive.