Mercurial has something called command server[1], it's essentially a daemon listening on sockets to receive commands, designed just to avoid the cost of startup. I had to use it once in a CI system where we did invoke hg thousands of times for some reason i can't even remember.
That can also be used for frequent polling like shell status.
In fact I have hg locally aliased to chg and have not noticed any issues with it. Just much faster command completions and an actually usable shell that includes hg annotations.
That can also be used for frequent polling like shell status.
[1] https://www.mercurial-scm.org/wiki/CommandServer