you can move this code before the cmd.isProcessedAsynchronously() statement above (line #112) so that it gets re-used between sync and async processed commands and only keep the cmd.perform in the Runnable as only that one is costly.