When you try to reload the QVW apps which is connecting to database and when not able to find the tables the process will hang.
Also if you have too many synthetic keys in your app after reload the process will hang.
Let me know how many apps you are reloading what are the file sizes, how much time it takes if u run manually then we can see what is the issue.
I also think that the best way is to make a manual step by step debug. During this keep Windows process manager opend so you can see when RAM usage increase. And you will see the exact point where the process stall, what's the document that doesn't work. So you can work on it. Or you can try to exclude it in a debug version of the process and check if the others document reloads works fine.