After suffering a great deal of pain with slow OSD today, I have found a particular Client Setting to be the culprit!
In Client Settings > Client Cache Settings, using “Enable Configuration Manager client in full OS to share content” seems like a great idea – but it actually kicks in during OSD! When the Task Sequence is in Windows (i.e. rebooted from WinPE) the device being built will search for content on other clients and make it SUPER SLOW!!
This article has a bit more database type detail (https://sccmisevil.wordpress.com/2017/07/31/the-strange-case-of-peer-cache-not-getting-disabled/) but until this is fixed, I’d advise you to avoid it.