Thanks for giving some thought to this.
Welcome certainly could do speed-up.
Using bashdb can show the places where it consumes time
I have done that a few times, but new features have been developed after the latest debugging.
To speed up certain time consuming operations the structure needs changes.
I plan to check this after Summer.