We currently don't time out any of the block building efforts, but @birchmd's load testing has shown that block build times can be very variable, sometimes (though rarely) exceeding configured block time.
What Geth does in this case is offsetting the build job into the background and allowing it to do a few rounds of populating the transactions from mempool while also keeping track of the elapsed time. The last round happens when timeout is drawing near, i.e. there is less time left than last update cycle length.
We currently don't time out any of the block building efforts, but @birchmd's load testing has shown that block build times can be very variable, sometimes (though rarely) exceeding configured block time.
What Geth does in this case is offsetting the build job into the background and allowing it to do a few rounds of populating the transactions from mempool while also keeping track of the elapsed time. The last round happens when timeout is drawing near, i.e. there is less time left than last update cycle length.