(I have posted this a question on another section - I have decide to report it a bug here, original question [here][1] )
I have been investigating why Material Editor is running so poorly on my machine. Not the latest or fastest machine of its era, but not bad.
I have noticed that the task ShaderCompileWorker.exe is spawn with the OS priority of BelowNormal. Simply using the task manager to shift the priority to normal or higher makes a significant increase performance, from several minutes down to seconds.
Please review the two videos I have prepared the first shows the out of the box performance for material editor. I can forgive skipping ahead as it is nearly 3 mins long…but please appreciate how simple a change is being made to the material and how slow the process is…
The second shows me manually adjusting the priority, preview tasks complete extremely quickly once the priority has been changed.
I have spotted in source code for ShaderCompiler.cpp that the priority is hard coded:
I’m currently installing the requirements for rebuilding from source, and going through the recompile process myself, as you probably know this is quite a task…
Excellent work!
Could you please share an executable file? (I have no compiler installed)
You may add it to the “releases” tab in a github repository.
You do not have to rebuild the engine from source, a much easier method is to just have the ShaderCompilerWorker program raise its own priority level on launch.
for example in ShaderCompilerWorker.cpp add this in the GuardedMainWrapper function:
Download the engine source and make the changes listed above, Recompile the ShaderCompilerWorker project, then copy and paste the ShaderCompileWorker.exe from the source engine binaries output folder to your engine installation binaries folder.