Title says it pretty much everything. just execute this in py console:
def cb(sce): print("foo")
bpy.app.handlers.scene_update_post.append(cb)
…and you'll get endless 'foo' lines in your console, even when Blender is hidden and all.
Issue is, main loop calls (through `wm_event_do_notifiers()`) `BKE_scene_update_tagged()`, which unconditionally fires those pre/post scene update handlers.
Not quite sure what's to be done here really, not familiar at all with this area of the code.