Just out of curiosity, then how does wallets like blockchain.com manage millions of wallet? They may be receiving walletnotify callback every second.
I got your point and we also thought of the same, to run loop for every wallet on our node to check for gettransaction.