Also, there is a WIP on the scripting API that might make implementing such things simpler and with the more control over the script context. It doesn’t solve the performance problems though, but may add some more control to this area too.
I hope to publish updated KEEP about it relatively soon.