I have had strange issues for several months with Unreal Engine compiling shaders reaaalllly slow. I have tried pretty much everything, but finally I found the possible reason.
I was playing around making custom Unreal Engine builds from source and had Visual Studio installed. This in turn installed Incredibuild.
Existence of Incredibuild in the system caused CPU utilization to never reach even 60% and the shader compilation time went about 3X the normal. I had to uninstall that from the Visual Studio installer which is not the most intuitive. But this instantly fixed the issue. Voila. Now my CPU runs at 100% , my room gets hot and fans kick like a jet engine.
But shaders compile in less than eternity.