I create a new account for each users I accept deposit from with getaccountaddress
then I have a daemon that checks listaccounts for any deposits.
That is not going to work well with thousands of accounts. Instead, properly use listsinceblock.
The reasoning for this is that making new accounts is something that happens very often, and you won't be receiving deposits from all them, so it makes little sense to use listaccounts for this task.