You are making sure that a delegate can only participate in a round once on average.
This means that a delegate does not know in advance when he will go...but when he does get to go he can mine his secrets to make sure he gets to go next....
So you have to wait until at least N delegates have gone before you can be secure. You gain nothing by shuffling every time.
If you want to gain something then you need delegates to commit in advance to 101 secrets to be revealed in time and then shuffle every turn. A delegate would not be able to mine their secret on their turn because they have pre-committed to the next 101 secrets.
Correct me if I'm wrong as I'm not so familiar with the code.
For mining, you can see from the code that I'm shuffling the rest delegates after the signing delegate. The signing delegate will be excluded in this round and he can't mine before hand because his secret will only be used in next round and he needs to know all the other delegates' secrets to mine. This works like below:
1st delegate of shuffled top 100 signs the block, shuffle the rest 99 delegates.
2nd delegate of shuffled top 100 signs the block, shuffle the rest 98 delegates.
3nd delegate of shuffled top 100 signs the block, shuffle the rest 97 delegates.
...
50th delegate of shuffled top 100 signs the block, shuffle the rest 50 delegates.
1st delegate of shuffled top 100 signs the block, shuffle the rest 99 delegates.
From my understanding, every delegates commits their secrets by showing hash of secrets. Then reveal their secrets in the their round. I checked the code of chain_database_impl::update_delegate_production_info and wallet::sign_block to understand the way secret works.