Download

Shader compile is too slow (Missing cached shader map error)

Hello. I figured out shader compile on my pc is too slow.

I added just one vector3 parameter and compiled it.

It took over 10sec.

So I tried on other coworker’s pc.

It finished in 3sec.

I checked task manager.

when shader compiler is running, only 1 ShaderCompileWork.exe is working

and it enable 1sec, disable 1sec, enable 1sec, disable 1sec, repeat until compile finish.

coworker’s is running 3 ShaderCompileWork.exe and work continue until compile finish.

I dont know why it happened even my pc’s spec is higher than my coworker’s pc.

I’m using SSD and coworker is using HDD.

both windows 10 and UE4 version is 4.21.

please help to fix this problem.

thank you.

I checked my log when compile is running.

LogMaterial: Display: Missing cached shader map for material FMatExpressionPreview MaterialExpressionConstant3Vector_1, compiling.
LogMaterial: Display: Missing cached shader map for material M_test, compiling.
LogMaterial: Display: Missing cached shader map for material M_test, compiling.
LogMaterial: Display: Missing cached shader map for material FMatExpressionPreview MaterialExpressionConstant3Vector_1, compiling.
LogMaterial: Display: Missing cached shader map for material FMatExpressionPreview MaterialExpressionConstant3Vector_1, compiling.
LogMaterial: Display: Missing cached shader map for material M_test, compiling.
LogMaterial: Display: Missing cached shader map for material FMatExpressionPreview MaterialExpressionConstant3Vector_1, compiling.
LogMaterial: Display: Missing cached shader map for material M_test, compiling.
LogSlate: Window ‘Color Picker’ being destroyed
LogMaterialEditor: Applying material M_test
LogMaterial: Display: Missing cached shader map for material M_test, compiling.
LogMaterial: Display: Missing cached shader map for material M_test, compiling.
LogMaterial: Display: Missing cached shader map for material M_test, compiling.
LogUObjectHash: Compacting FUObjectHashTables data took 1.18ms
LogMaterial: Display: Missing cached shader map for material DebugViewMode MaterialTexCoordScale, compiling.
TextureStreamingBuild: Display: Compiling optional shaders took 8.865 seconds.
LogUObjectHash: Compacting FUObjectHashTables data took 0.65ms
MaterialEditorStats: Base pass shader: 108 instructions
MaterialEditorStats: Base pass shader with Volumetric Lightmap: 182 instructions
MaterialEditorStats: Base pass vertex shader: 41 instructions
MaterialEditorStats: Texture samplers: 3/16


co-worker’s log is like this

LogMaterial: Display: Missing cached shader map for material FMatExpressionPreview MaterialExpressionConstant3Vector_0, compiling.
LogShaderCompilers: Display: Shaders left to compile 2
LogShaderCompilers: Display: Shaders left to compile 1
LogMaterial: Display: Missing cached shader map for material NewMaterial, compiling.
LogShaderCompilers: Display: Shaders left to compile 30
LogShaderCompilers: Display: Shaders left to compile 29
LogShaderCompilers: Display: Shaders left to compile 28
LogShaderCompilers: Display: Shaders left to compile 27
LogShaderCompilers: Display: Shaders left to compile 26
LogShaderCompilers: Display: Shaders left to compile 25
LogShaderCompilers: Display: Shaders left to compile 24
LogShaderCompilers: Display: Shaders left to compile 23
LogShaderCompilers: Display: Shaders left to compile 22
LogShaderCompilers: Display: Shaders left to compile 21
LogShaderCompilers: Display: Shaders left to compile 20
LogShaderCompilers: Display: Shaders left to compile 19
LogShaderCompilers: Display: Shaders left to compile 18
LogMaterial: Display: Missing cached shader map for material NewMaterial, compiling.
LogMaterial: Display: Missing cached shader map for material FMatExpressionPreview MaterialExpressionConstant3Vector_0, compiling.
LogMaterial: Display: Missing cached shader map for material FMatExpressionPreview MaterialExpressionConstant3Vector_0, compiling.
LogMaterial: Display: Missing cached shader map for material NewMaterial, compiling.
LogShaderCompilers: Display: Shaders left to compile 2
LogShaderCompilers: Display: Shaders left to compile 1
LogMaterial: Display: Missing cached shader map for material FMatExpressionPreview MaterialExpressionConstant3Vector_0, compiling.
LogMaterial: Display: Missing cached shader map for material NewMaterial, compiling.
LogShaderCompilers: Display: Shaders left to compile 2
LogSlate: Window ‘カラー ピッカー’ being destroyed
LogShaderCompilers: Display: Shaders left to compile 31
LogShaderCompilers: Display: Shaders left to compile 30
LogShaderCompilers: Display: Shaders left to compile 29
LogShaderCompilers: Display: Shaders left to compile 28
LogShaderCompilers: Display: Shaders left to compile 27
LogShaderCompilers: Display: Shaders left to compile 26
LogShaderCompilers: Display: Shaders left to compile 25
LogShaderCompilers: Display: Shaders left to compile 24
LogShaderCompilers: Display: Shaders left to compile 23
LogShaderCompilers: Display: Shaders left to compile 22
LogShaderCompilers: Display: Shaders left to compile 21
LogShaderCompilers: Display: Shaders left to compile 20
LogShaderCompilers: Display: Shaders left to compile 19
LogShaderCompilers: Display: Shaders left to compile 18
LogShaderCompilers: Display: Shaders left to compile 17
LogShaderCompilers: Display: Shaders left to compile 16
LogShaderCompilers: Display: Shaders left to compile 15
LogShaderCompilers: Display: Shaders left to compile 14
LogShaderCompilers: Display: Shaders left to compile 13
LogShaderCompilers: Display: Shaders left to compile 12
LogShaderCompilers: Display: Shaders left to compile 11
LogShaderCompilers: Display: Shaders left to compile 10
LogShaderCompilers: Display: Shaders left to compile 9
LogShaderCompilers: Display: Shaders left to compile 8
LogShaderCompilers: Display: Shaders left to compile 7
LogShaderCompilers: Display: Shaders left to compile 6
LogShaderCompilers: Display: Shaders left to compile 5
LogShaderCompilers: Display: Shaders left to compile 4
LogShaderCompilers: Display: Shaders left to compile 3
LogShaderCompilers: Display: Shaders left to compile 2
LogShaderCompilers: Display: Shaders left to compile 1
MaterialEditorStats: Base pass shader: 64 instructions
MaterialEditorStats: Base pass shader with Volumetric Lightmap: 85 instructions
MaterialEditorStats: Base pass vertex shader: 107 instructions
MaterialEditorStats: Texture samplers: 3/16

I tested same thing on 4.17

it was super fast

It took only 0.5 sec

LogMaterialEditor: Applying material NewMaterial
LogMaterial: Missing cached shader map for material NewMaterial, compiling.
LogMaterial: Missing cached shader map for material NewMaterial, compiling.
LogMaterial: Missing cached shader map for material NewMaterial, compiling.
LogMaterial: Missing cached shader map for material FDebugViewModeMaterialProxy NewMaterial, compiling.
TextureStreamingBuild:Display: Compiling optional shaders took 0.516 seconds.
MaterialEditorStats: 情報 Base pass shader: 79 instructions
MaterialEditorStats: 情報 Vertex shader: 29 instructions
MaterialEditorStats: 情報 Texture samplers: 2/16

I found a solution.
I uninstalled incredible build and it fixed.

Thanks man! Incredibuild was the problem for me too! My shaders compile faster than ever thanks to your suggestion!

For me, it is the opposite haha. It’s much faster with Incredibuild. I guess you need to try out and find out for yourself.

You can try to delete the “\UnrealEngine\Engine\Plugins\XGEController” plugin.

Try this: 第7期(3): 避免“XGEController”插件和“Incredibuild”引起启动编辑器时一直卡在某个位置(如39%处);Editor中Shader编译时卡在某位置(但是能正常使用编辑器) - 知乎