For me python scripts are very slow, too.
I also noticed some strange behaviour, which can be reduced to such minimum working example:
while not xbmc.abortRequested:
xbmc.log("[test] > sleep", level=xbmc.LOGNOTICE)
xbmc.log("[test] > sleep end", level=xbmc.LOGNOTICE)
It produces this log:
14:58:33.742 T:1672737776 NOTICE: [test] > sleep
14:58:35.812 T:1672737776 NOTICE: [test] > sleep end
Between both log messages are around 2.1 seconds - I would expect sth around 0.5s.