Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Shader Graph is extremely slow since the LTS. 3000 MS instantiate of nodes.

Discussion in 'Shader Graph' started by EricFFG, Jun 2, 2023.

  1. EricFFG

    EricFFG

    Joined:
    May 10, 2021
    Posts:
    183
    We tested in an empty project and on 3 PCs with 100% reproduction.

    Shader graph now takes up to multiple seconds to instantiate a node onto the graph.
    This scales linearly with shader node count it seems. This had not been the case on 2022.1 or prior.

    The Profiler shows a ton of action happening when instantiating.

    All 3 computers on high end CPUs (13900k etc) were showing upwards or 2000-3000 ms.
    With editor profiler enabled up to 8000 ms. Even deleting is very laggy. This was on a medium sized shader with 60 nodes but is noticeable on smaller ones as well. If it is empty, it is basically instant.

    This makes working in shader graph extremely painful right now. Please have a look immediately.

    A bugreport was also filed.

    Edit 4th October:
    2022.3.10 does fix the laggy nodes but the shader recompile times are COMPLETELY UNACCEPTABLE and broken still, I think this started happening with 9 or 8 (hard to say since shader graph was unusable for so long)

    For the love of god unity please TEST your software, this is a disgrace
    We waited so long now and I have a 50 seconds complete freeze of the editor on shader compile, how are we supposed to work like this? In older versions this was a couple seconds recompile. Am I downloading now a 2020 LTS and porting shaders over?

    I open .10 and all non shader graph shaders are completely broken, my scene is flashing like a disco. First we cannot place single nodes and now we have to wait forever for a compile after this is fixed and all third party shaders are broken, jesus christ people

    This is indicating that a lot of under the hood stuff was touched again, on a patch which is just supposed to be a minor incremental stability update.

    Edit2: This might be releated to asset importing, since a texture import now takes 60 seconds on 13900k and freezes the entire editor, so maybe the shader graph does the same operation.
    LINK Unity Editor CoreDLL keeps locking up for 60 seconds every time.

    Holy S*** I just realized I filed this original post on June 2 ...... We have October now
    I would like to be able to work this year please.
     
    Last edited: Oct 4, 2023
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,973
    Thanks for reporting, hope it will be fixed soom
     
  3. Liam2349

    Liam2349

    Joined:
    Mar 10, 2016
    Posts:
    78
    Same issue here. I have a shader graph with around 70 nodes and it takes around 5 seconds to add a new node or make a connection.

    This started after moving from 2021.3.20 to 2022.3.0.

    Same issue with 2022.3.1.

    I think this has also caused two crashes for me today.
     
  4. EricFFG

    EricFFG

    Joined:
    May 10, 2021
    Posts:
    183
    I got a confirmation that the bug is reproduced and being looked at on my report
     
    Liam2349 and DevDunk like this.
  5. Liam2349

    Liam2349

    Joined:
    Mar 10, 2016
    Posts:
    78
    Lol that was fast. My bug reports are already fixed by the time they get back to me.
     
  6. OhiraKyou

    OhiraKyou

    Joined:
    Mar 27, 2012
    Posts:
    259
    Yeah, Shader Graph has become unusably unresponsive after updating from Unity 2022.2.1f1 to 2022.3.1f1 (LTS).

    Ironically, I updated specifically in the hopes of improved responsiveness in Shader Graph, which was already becoming painfully slow to work with on complex graphs. I tried to work through the significantly longer wait times in the LTS version by moving some code to external text files and custom functions. But, then I tried pasting some nodes from another shader. After waiting over 30 minutes, I had to just end the process. Unity Editor was taking 20 GB of memory, plus 5+ more in drive space.

    Edit: still a problem in 2022.3.2f1
     
    Last edited: Jun 14, 2023
  7. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,023
  8. Liam2349

    Liam2349

    Joined:
    Mar 10, 2016
    Posts:
    78
    What's concerning to me is that I have not yet even seen this bug acknowledged in the Unity release notes. It seems the fix will be a long way off.

    This is exactly why Unity should be making games with their products. If anyone from Unity used Shader Graph, there is no way they would leave it this broken.
     
  9. FredMoreau

    FredMoreau

    Unity Technologies

    Joined:
    May 27, 2019
    Posts:
    152
    Hey folks, thanks for the heads up!

    @EricFFG do you have a link to that bug report?
     
  10. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,023
    40 min and 18 gb memory usage to add float to the graph. Unable to coppy more then 2 bricks in shader. Comeoneee:p
     
  11. ilcane87

    ilcane87

    Joined:
    Apr 29, 2022
    Posts:
    8
  12. EricFFG

    EricFFG

    Joined:
    May 10, 2021
    Posts:
    183
    RobOuellette, FredMoreau and DevDunk like this.
  13. RobOuellette

    RobOuellette

    Joined:
    Jun 5, 2018
    Posts:
    10
    Unity 2022.3.5 LTS / Shadergraph 14.0.8. Echoing what many here are already saying.

    Lowkey getting convinced this is a PsyOp to get everyone to learn HLSL when they inevitably snap from waiting for the editor to connect two nodes together and come to the conclusion that learning shader programming would be faster.

    I've started pre-allocating and rationing node creation in another empty graph and pasting them in so I can eat the cost of the editor stall once instead of per-change. This sometimes uses the entirety of my system memory (~64GB) causing the editor and all other open apps to crash. Connecting, disconnecting, adding, or deleting a node costs anywhere between 1-2 minutes in a complex graph. I'm using sub-graphs as much as I feasibly can, but it doesn't help too much.

    I won't presume the testing Unity is (or isn't) doing internally, but it feels like this wasn't tested in actual production scenarios beyond twee tech art demo projects. The friction is high enough to make it virtually unusable relative to other shader graph editors like ASE, etc. :/
     
    Shack_Man and BEBADBOI like this.
  14. OhiraKyou

    OhiraKyou

    Joined:
    Mar 27, 2012
    Posts:
    259
    I've been using Custom Function nodes with external HLSL scripts to mitigate this. There's still a lot of delay on later Unity builds when connecting and reordering inputs when there are a lot of them. But, I can freely edit the scripts and see results pretty quickly when saving them.

    On the workflow side, I've found using external functions to be a nice compromise, because it delegates what I dislike most about shader coding (all of the boilerplate—especially Unity-specific library function calls) to Unity itself via Shader Graph. So, I can just focus on the implementation math that I'm actually interested in. To that end, I dump inputs (like world position and light direction) into function inputs so that the functions don't need to be aware of or rely on Unity's current implementation details.

    As a bonus, this mitigates the ridiculous file size growth of shadergraph files and improves version diff readability.
     
  15. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,549
    Literally just pasting a bunch of nodes from one graph to another. Made this screenshot 5+ mins ago.. and it's still busy.

    MaterialGraphEditWindow_ExecuteCommand_Nightmares.png
     
    BEBADBOI likes this.
  16. Crazy34

    Crazy34

    Joined:
    Jul 14, 2019
    Posts:
    65
    BEBADBOI likes this.
  17. EricFFG

    EricFFG

    Joined:
    May 10, 2021
    Posts:
    183
    Yeah we need a fix soon, working in Shaders is basically impossible and completely blocked like this
     
    BEBADBOI likes this.
  18. ben_and_his_beard

    ben_and_his_beard

    Joined:
    Nov 29, 2016
    Posts:
    6
    It's really hard to focus on what I'm trying to build with my shaders when I have to pause for ten to thirty seconds every time I make or break a connection, and longer if I want to group things, copy paste, or create new nodes. And that's not even mentioning the disaster that would ensue should I ever forget myself and hit undo. It's fine if you only need to make a few quick tweaks, but if you're trying to experiment the delays are brutal.

    It's

    like
    try---ing

    • read to a
    book...................... that's
    written
    like
    this.
    You
    much so spend​
    time_____in_____the​
    pauses
    tHAt
    the​



    overall
    is
    thought
    lost.​
     
    Thygrrr, BEBADBOI, BOXOPHOBIC and 3 others like this.
  19. RobOuellette

    RobOuellette

    Joined:
    Jun 5, 2018
    Posts:
    10
    Not sure if this is a one-size-fits-all problem - but I was able to repro my issue across 2022 + 2021 LTS.

    In my case, it seemed to be related to using / creating shader keywords. A graph that effectively became immutable from the lag was fairly snappy again after removing all user-defined keywords. Not a fix, but hopefully helpful in finding one.

    Here's to hoping adding keywords to the generated shader manually isn't a nightmare!
     
  20. ilcane87

    ilcane87

    Joined:
    Apr 29, 2022
    Posts:
    8
    My Shader Graph has been extra slow since 2021 LTS, and I'm not using keywords in it, just a whole lot of textures.
    The shader is perfectly performant in-game, but the graph is near unusable, whenever I have to add a bunch of parameters I know in advance it's going to take me a whole day between load times and crashes, so I have to plan for it way in advance.

    It could all be easily solved if we could simply disable automatic previewing in the graph, but alas, it's been asked for years on end to no avail.
     
  21. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,549
    I'm seeing noticeable performance improvements in 2022.3.6f1 (or rather, best performance improvements to working within Shader Graph from one version of the editor to the next that I've ever seen). Quoted from release notes:

    Shadergraph: [SGB-613][SGB-594] Addressed an issue where certain operations were taking too long as a result of graph concretization.

    A few other Shader Graph things also mentioned as fixed:

    Shadergraph: [SGB-561] Addressed issue where save/save as hotkeys weren't being caught by shadergraph editor window.
    Shadergraph: [SGB-581][SGB-531] Addressed minor usability issues with Custom Function Nodes.
    Shadergraph: [SGB-592][SGB-596] Addressed issue where docs links from editor were incorrect.
    Shadergraph: [SGB-597] Removed invalid character from imported material sub asset.
    Shadergraph: [SGB-605] Addressed issue where adding dropdown property type to newly created subgraphs did not propagate to other open shadergraph editor windows.
    Shaders: Fixed canceling shader variant compilation not working when compilation was async. (UUM-9826)
     
    ilcane87, OhiraKyou and FredMoreau like this.
  22. Thygrrr

    Thygrrr

    Joined:
    Sep 23, 2013
    Posts:
    699
    I'm not seeing a reasonale performance improvement in 2022.3.6f1 (it may have been worse in .5f1, but it's still inacceptable)

    I get memory leaks the following when Instantiating or reconnecting / disconnecting nodes, probably because the editor hangs for 1000-2000 ms and these TempJob allocations just aren't made for that kind of stress, you know? :p

    Connect float3 node to an input (all images)
    upload_2023-8-5_13-40-50.png upload_2023-8-5_13-41-0.png upload_2023-8-5_13-41-21.png upload_2023-8-5_13-41-34.png upload_2023-8-5_13-42-1.png

    Code (Boo):
    1. Diagnostic switches are active and may impact performance or degrade your user experience. Switches can be configured through the Diagnostics section in the Preferences window.
    2.     JobTempMemoryLeakValidation: True
    3.  
    4. Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 5)
    5. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    6.  
    7. Allocation of 1 bytes at e027f360 in block 1 (frameIndex=9, lifetime=4, age=5, state=EXPIRED)
    8. 0x00007ff7a21d78c1 (Unity) UnsafeUtility_CUSTOM_Malloc
    9. 0x00007ffb95f202ae (ae5993d98a57d7fab0b94e4451c2097) Unity.Jobs.IJobExtensions.JobStruct`1<Unity.Rendering.AllocateDrawCommandsJob>.Execute(ref Unity.Rendering.AllocateDrawCommandsJob data, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, ref Unity.Jobs.LowLevel.Unsafe.JobRanges ranges, int jobIndex) -> void_4ef5b0c99fea54130fbdc9f298f0531a from UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null (at C:/Projects/jupiter-blue/Library/PackageCache/com.unity.burst@1.8.7/.Runtime/unknown/unknown:0)
    10. 0x00007ffb95f1fbc6 (ae5993d98a57d7fab0b94e4451c2097) 5c2e73fcca8d0647c19dd87048bc138e
    11. 0x00007ff7a2dfc2dc (Unity) ExecuteJob
    12. 0x00007ff7a2dfd69f (Unity) ForwardJobToManaged
    13. 0x00007ff7a2df92fc (Unity) ujob_execute_job
    14. 0x00007ff7a2df89e4 (Unity) lane_guts
    15. 0x00007ff7a2dfb544 (Unity) worker_thread_routine
    16. 0x00007ff7a3027cc7 (Unity) Thread::RunThreadWrapper
    17. 0x00007ffc3e0326ad (KERNEL32) BaseThreadInitThunk
    18. 0x00007ffc3ee2aa78 (ntdll) RtlUserThreadStart
    19.  
    20. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    21.  
    22. 00 .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..  .
    23. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    24.  
    25. Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 5)
    26. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    27.  
    28. Allocation of 1 bytes at e027f290 in block 1 (frameIndex=9, lifetime=4, age=5, state=EXPIRED)
    29. 0x00007ff7a21d78c1 (Unity) UnsafeUtility_CUSTOM_Malloc
    30. 0x00007ffb95f40c25 (ae5993d98a57d7fab0b94e4451c2097) Unity.Jobs.IJobExtensions.JobStruct`1<Unity.Rendering.AllocateInstancesJob>.Execute(ref Unity.Rendering.AllocateInstancesJob data, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, ref Unity.Jobs.LowLevel.Unsafe.JobRanges ranges, int jobIndex) -> void_4ef5b0c99fea54130fbdc9f298f0531a from UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null (at C:/Projects/jupiter-blue/Library/PackageCache/com.unity.burst@1.8.7/.Runtime/unknown/unknown:0)
    31. 0x00007ffb95f40556 (ae5993d98a57d7fab0b94e4451c2097) 7a734e04a21e56d41547bc90f999e734
    32. 0x00007ff7a2dfc2dc (Unity) ExecuteJob
    33. 0x00007ff7a2dfd69f (Unity) ForwardJobToManaged
    34. 0x00007ff7a2df92fc (Unity) ujob_execute_job
    35. 0x00007ff7a2df89e4 (Unity) lane_guts
    36. 0x00007ff7a2dfb544 (Unity) worker_thread_routine
    37. 0x00007ff7a3027cc7 (Unity) Thread::RunThreadWrapper
    38. 0x00007ffc3e0326ad (KERNEL32) BaseThreadInitThunk
    39. 0x00007ffc3ee2aa78 (ntdll) RtlUserThreadStart
    40.  
    41. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    42.  
    43. 00 .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..  .
    44. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    45.  
    46. Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 5)
    47. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    48.  
    49. Allocation of 1 bytes at e027f420 in block 1 (frameIndex=9, lifetime=4, age=5, state=EXPIRED)
    50. 0x00007ff7a21d78c1 (Unity) UnsafeUtility_CUSTOM_Malloc
    51. 0x00007ffb95f202d8 (ae5993d98a57d7fab0b94e4451c2097) Unity.Jobs.IJobExtensions.JobStruct`1<Unity.Rendering.AllocateDrawCommandsJob>.Execute(ref Unity.Rendering.AllocateDrawCommandsJob data, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, ref Unity.Jobs.LowLevel.Unsafe.JobRanges ranges, int jobIndex) -> void_4ef5b0c99fea54130fbdc9f298f0531a from UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null (at C:/Projects/jupiter-blue/Library/PackageCache/com.unity.burst@1.8.7/.Runtime/unknown/unknown:0)
    52. 0x00007ffb95f1fbc6 (ae5993d98a57d7fab0b94e4451c2097) 5c2e73fcca8d0647c19dd87048bc138e
    53. 0x00007ff7a2dfc2dc (Unity) ExecuteJob
    54. 0x00007ff7a2dfd69f (Unity) ForwardJobToManaged
    55. 0x00007ff7a2df92fc (Unity) ujob_execute_job
    56. 0x00007ff7a2df89e4 (Unity) lane_guts
    57. 0x00007ff7a2dfb544 (Unity) worker_thread_routine
    58. 0x00007ff7a3027cc7 (Unity) Thread::RunThreadWrapper
    59. 0x00007ffc3e0326ad (KERNEL32) BaseThreadInitThunk
    60. 0x00007ffc3ee2aa78 (ntdll) RtlUserThreadStart
    61.  
    62. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    63.  
    64. d4 .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..  .
    65. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    66.  
    67. Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 5)
    68. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    69.  
    70. Allocation of 56 bytes at e027d5e0 in block 1 (frameIndex=9, lifetime=4, age=5, state=EXPIRED)
    71. 0x00007ff7a2bed20e (Unity) CullScene
    72. 0x00007ff7a2bc71cc (Unity) Camera::CustomCull
    73. 0x00007ff7a2bde161 (Unity) Camera::StandaloneCustomRender
    74. 0x00007ff7a2bde34b (Unity) Camera::StandaloneRender
    75. 0x00007ff7a2bd4f89 (Unity) CameraScripting::Render
    76. 0x00007ff7a239a97d (Unity) Camera_CUSTOM_Render
    77. 0x00000187fade96d1 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Camera:Render (UnityEngine.Camera)
    78. 0x000001843b8afbe3 (Mono JIT Code) UnityEditor.ShaderGraph.Drawing.PreviewManager:RenderPreview (UnityEditor.ShaderGraph.Drawing.PreviewRenderData,UnityEngine.Mesh,UnityEngine.Matrix4x4,UnityEditor.ShaderGraph.PooledList`1<UnityEditor.ShaderGraph.PreviewProperty>) (at ./Library/PackageCache/com.unity.shadergraph@14.0.8/Editor/Drawing/PreviewManager.cs:1183)
    79. 0x000001879b58d8b3 (Mono JIT Code) UnityEditor.ShaderGraph.Drawing.PreviewManager:RenderPreviews (UnityEditor.EditorWindow,bool) (at ./Library/PackageCache/com.unity.shadergraph@14.0.8/Editor/Drawing/PreviewManager.cs:648)
    80. 0x00000187fadd9b5b (Mono JIT Code) UnityEditor.ShaderGraph.Drawing.GraphEditorView:HandleGraphChanges (bool) (at ./Library/PackageCache/com.unity.shadergraph@14.0.8/Editor/Drawing/Views/GraphEditorView.cs:686)
    81. 0x000001879947d4d3 (Mono JIT Code) UnityEditor.ShaderGraph.Drawing.MaterialGraphEditWindow:Update () (at ./Library/PackageCache/com.unity.shadergraph@14.0.8/Editor/Drawing/MaterialGraphEditWindow.cs:372)
    82. 0x0000018799479e30 (Mono JIT Code) UnityEditor.HostView:SendUpdate ()
    83. 0x00000187983ff148 (Mono JIT Code) UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    84. 0x00000186410ccde5 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    85. 0x00007ffbb97ae0d4 (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
    86. 0x00007ffbb96eeb74 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3066)
    87. 0x00007ffbb96eed0c (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3113)
    88. 0x00007ff7a31d6f54 (Unity) scripting_method_invoke
    89. 0x00007ff7a31b5bd4 (Unity) ScriptingInvocation::Invoke
    90.  
    91. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    92.  
    93. 60 f3 27 e0 85 01 00 00 90 f2 27 e0 85 01 00 00  `.'.......'.....
    94. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    95.  
    96. 20 f4 27 e0 85 01 00 00 00 00 00 00 00 00 00 00   .'.............
    97. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    98.  
    99. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    100. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    101.  
    102. 00 00 00 00 00 00 00 00 .. .. .. .. .. .. .. ..  ........
    103. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    104.  
    105. Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 5)
    106. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    107.  
    108. Allocation of 32 bytes at e02bbd60 in block 1 (frameIndex=9, lifetime=4, age=5, state=EXPIRED)
    109. 0x00007ff7a23e1d14 (Unity) dynamic_array_detail::dynamic_array_data::reallocate
    110. 0x00007ff7a2ff156c (Unity) dynamic_array_detail::dynamic_array_data::grow
    111. 0x00007ff7a2b53b3d (Unity) BatchRendererGroup::DelayDeletePointers
    112. 0x00007ff7a2b5a4db (Unity) BatchRendererCullingOutputs::SyncAndRelease
    113. 0x00007ff7a2bed660 (Unity) DestroyCullingOutput
    114. 0x00007ff7a2be9552 (Unity) CullResults::~CullResults
    115. 0x00007ff7a2bde1bd (Unity) Camera::StandaloneCustomRender
    116. 0x00007ff7a2bde34b (Unity) Camera::StandaloneRender
    117. 0x00007ff7a2bd4f89 (Unity) CameraScripting::Render
    118. 0x00007ff7a239a97d (Unity) Camera_CUSTOM_Render
    119. 0x00000187fade96d1 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Camera:Render (UnityEngine.Camera)
    120. 0x000001843b8afbe3 (Mono JIT Code) UnityEditor.ShaderGraph.Drawing.PreviewManager:RenderPreview (UnityEditor.ShaderGraph.Drawing.PreviewRenderData,UnityEngine.Mesh,UnityEngine.Matrix4x4,UnityEditor.ShaderGraph.PooledList`1<UnityEditor.ShaderGraph.PreviewProperty>) (at ./Library/PackageCache/com.unity.shadergraph@14.0.8/Editor/Drawing/PreviewManager.cs:1183)
    121. 0x000001879b58d8b3 (Mono JIT Code) UnityEditor.ShaderGraph.Drawing.PreviewManager:RenderPreviews (UnityEditor.EditorWindow,bool) (at ./Library/PackageCache/com.unity.shadergraph@14.0.8/Editor/Drawing/PreviewManager.cs:648)
    122. 0x00000187fadd9b5b (Mono JIT Code) UnityEditor.ShaderGraph.Drawing.GraphEditorView:HandleGraphChanges (bool) (at ./Library/PackageCache/com.unity.shadergraph@14.0.8/Editor/Drawing/Views/GraphEditorView.cs:686)
    123. 0x000001879947d4d3 (Mono JIT Code) UnityEditor.ShaderGraph.Drawing.MaterialGraphEditWindow:Update () (at ./Library/PackageCache/com.unity.shadergraph@14.0.8/Editor/Drawing/MaterialGraphEditWindow.cs:372)
    124. 0x0000018799479e30 (Mono JIT Code) UnityEditor.HostView:SendUpdate ()
    125. 0x00000187983ff148 (Mono JIT Code) UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    126. 0x00000186410ccde5 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    127. 0x00007ffbb97ae0d4 (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
    128.  
    129. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    130.  
    131. 60 f3 27 e0 85 01 00 00 90 f2 27 e0 85 01 00 00  `.'.......'.....
    132. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    133.  
    134. 20 f4 27 e0 85 01 00 00 e0 d5 27 e0 85 01 00 00   .'.......'.....
    135. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    136.  
    137. Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 5)
    138. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    139.  
    140. Allocation of 88 bytes at e0279af0 in block 1 (frameIndex=9, lifetime=4, age=5, state=EXPIRED)
    141. 0x00007ff7a2b5705b (Unity) BatchRendererGroup::OnEndFrame
    142. 0x00007ff7a33e1e32 (Unity) GfxDeviceClient::SubmitPresentFrameCallbacks
    143. 0x00007ff7a30e72fc (Unity) GfxDevice::EndDynamicVBOFrame
    144. 0x00007ff7a3e1ba88 (Unity) Application::TickTimer
    145. 0x00007ff7a428fbfa (Unity) MainMessageLoop
    146. 0x00007ff7a4295460 (Unity) WinMain
    147. 0x00007ff7a567e87e (Unity) __scrt_common_main_seh
    148. 0x00007ffc3e0326ad (KERNEL32) BaseThreadInitThunk
    149. 0x00007ffc3ee2aa78 (ntdll) RtlUserThreadStart
    150.  
    151. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    152.  
    153. 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00  ................
    154. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    155.  
    156. ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00  ................
    157. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    158.  
    159. 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    160. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    161.  
    162. 02 00 00 00 00 00 00 00 ff ff ff ff 00 00 00 00  ................
    163. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    164.  
    165. 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00  ................
    166. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    167.  
    168. 76 0a 00 00 01 00 00 00 .. .. .. .. .. .. .. ..  v.......
    169. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    170.  
    171. Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 6)
    172. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    173.  
    174. Allocation of 88 bytes at e02bc840 in block 1 (frameIndex=9, lifetime=4, age=6, state=EXPIRED)
    175. 0x00007ff7a2b5705b (Unity) BatchRendererGroup::OnEndFrame
    176. 0x00007ff7a33e1e32 (Unity) GfxDeviceClient::SubmitPresentFrameCallbacks
    177. 0x00007ff7a30e72fc (Unity) GfxDevice::EndDynamicVBOFrame
    178. 0x00007ff7a3e1ba88 (Unity) Application::TickTimer
    179. 0x00007ff7a428fbfa (Unity) MainMessageLoop
    180. 0x00007ff7a4295460 (Unity) WinMain
    181. 0x00007ff7a567e87e (Unity) __scrt_common_main_seh
    182. 0x00007ffc3e0326ad (KERNEL32) BaseThreadInitThunk
    183. 0x00007ffc3ee2aa78 (ntdll) RtlUserThreadStart
    184.  
    185. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    186.  
    187. 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00  ................
    188. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    189.  
    190. ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00  ................
    191. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    192.  
    193. 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    194. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    195.  
    196. 02 00 00 00 00 00 00 00 ff ff ff ff 00 00 00 00  ................
    197. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    198.  
    199. 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00  ................
    200. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    201.  
    202. a1 0c 00 00 01 00 00 00 .. .. .. .. .. .. .. ..  ........
    203. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    204.  
    205.  
     
    Last edited: Aug 5, 2023
  23. Thygrrr

    Thygrrr

    Joined:
    Sep 23, 2013
    Posts:
    699

    Because it may be hard to quantify what we mean when we say the UX is sluggish.

    You can see the mouse clicks - grey = no click, colored = button held/clicked. Fast doubleclicks may be subtle because the fastest fade speed for the color circle I can set is 100ms.

    In the first "attempt", I'm actually using the keyboard; you can't see me having to hit the enter key 3 or 4 times to get the node to load. You can see the first "enter" press in the moment the cursor in the text field jumps to the beginning of the line (which is after navigating with cursor keys - would instantly expect a commit/pick action there)

    You can see that after each node is placed or connected, I can move my mouse a good bit before shadergraph updates and becomes responsive again. Then, for another ~1000ms, the frame and reaction times are greatly extended, resulting in a choppy display (when moving nodes or when panning the screen). (that's the Shadergraph bug, I guess)

    The memory leaks piling up are also a good indicator to spot the moments where unity actually hung. (wish we could render a small animation in UI thread to illustrate)

    Usability wise, there are also a lot of "dead" areas in the searcher dropdown, I occasionally miss the selected item entirely, even though it is highlighted. The more I look at it, I suspect hovever, that the item just being unresponsive despite the highlight+hover state (makes sense in light of the enter key issue earlier). I'll try to record future vids with the actual mouse cursor, not just the highlight.

    I figure the post-search sluggishness is a problem of shadergraph. I believe the search box sluggishness is a Searcher problem.
     
    Last edited: Aug 6, 2023
    Lars-Steenhoff likes this.
  24. IffyJackson

    IffyJackson

    Joined:
    May 23, 2017
    Posts:
    21
    I'm going to bump this thread...

    Every.Single.Day.

    Just to make sure, someone at Unity think it's a good idea to fix this issue as soon as possible.

    Because the state Shader Graph is in right now is absolutely unacceptable in terms of performance in actual game development.

    Here's a video how unworkable Shader Graph has become: https://www.dropbox.com/scl/fi/37ag...able.mov?rlkey=41l24rmf70cxfa2ldksxex5xc&dl=0

    FYI, I'm working in Unity 2022.3.6 URP, Macbook Pro M1 Max.
     
    Last edited: Aug 8, 2023
    BEBADBOI, Ben_at_Work and Crazy34 like this.
  25. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,023
    Agree I stop developing shader until they fix that. I have no life for 20 min compilation every time I add property.
     
    Crazy34 likes this.
  26. Crazy34

    Crazy34

    Joined:
    Jul 14, 2019
    Posts:
    65
    We are waiting for the necessary arrangement for the Minimum 2022.3 LTS release. We do not update the engine to version 2022.3 LTS unless we see a definitive solution to this issue in the update notes. I hope they understand how important the issue is.
     
  27. IffyJackson

    IffyJackson

    Joined:
    May 23, 2017
    Posts:
    21
    Good. Let everyone speak up. This needs to be a F***ing A-priority for Unity.

    I've seen way, way too many threads that are running 3+ year long with major issues that are still unfixed and ignored. It's utterly appaling.
     
    Last edited: Aug 8, 2023
  28. EricFFG

    EricFFG

    Joined:
    May 10, 2021
    Posts:
    183
    Wait this is still not fixed in .6?
     
  29. IffyJackson

    IffyJackson

    Joined:
    May 23, 2017
    Posts:
    21
    NOPE. See my video in an earlier post. That was recorded using .6
     
  30. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,549
    7f1 is available now.
     
  31. IffyJackson

    IffyJackson

    Joined:
    May 23, 2017
    Posts:
    21
    I think you're referring to version 2023, 2022 (the latest LTS version is on .6) is having all of these problems.
    upload_2023-8-9_17-57-6.png
     
  32. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,631
    He meant that 2022.3.7f1 was released (look in the hub)
    upload_2023-8-9_20-20-11.png

    Don't look at the website, it is usually updated a day later therefore making it useless, because Unity departments can't work together.
     
    adamgolden likes this.
  33. IffyJackson

    IffyJackson

    Joined:
    May 23, 2017
    Posts:
    21
    Ah good to know, thanks! I'll check immediately and will make a video how the performance is on .7
     
  34. IffyJackson

    IffyJackson

    Joined:
    May 23, 2017
    Posts:
    21
  35. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,631
    It has been 2 months since the bug report, this is waaaay shorter than the average turn around time for not totally *omg my computer exploded* showstopper bugs. It can happen, but usually it takes much longer, so don't hold your breath waiting for this to get fixed in a timely manner for your schedule.
     
  36. IffyJackson

    IffyJackson

    Joined:
    May 23, 2017
    Posts:
    21
    I get what you're saying.

    But it's absolutely, completely, utterly mind blowing and unacceptable to leave a prime feature--which is Shader Graph in a completely useless state for an LTS version. I would not call this a trivial bug by any means of the definition, but literally a development stopper.

    The only viable alternative now is to go for ASE.
     
  37. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,631
    My point is that it's not mind blowing. Your account isn't that new, Unity has been doing things like this for a while now.
     
  38. IffyJackson

    IffyJackson

    Joined:
    May 23, 2017
    Posts:
    21
    Look fair enough I get where you are coming from as they seem pretty consistent with the following:

    We usually make everything ourselves because we learned that literally anything Unity touches has 2 core "values":
    • Create a tool and make it so that it's missing critical features and leave it at that (Timeline, Audio, UI etc etc.)
    • Make it completely non performant for low-end (Post processing, Shadow rendering etc.)
    Shader Graph is, of course no exception, but we took the one and only risk by going for a single native Unity solution in the hopes that this one would be different. Boy did we regret that.

    And just to add: it's just such a shame because with a little bit more effort, a little bit more motivation, a little bit more passion, a lot of these issues would be fixed or avoided. There are clearly competent people working at Unity, so I blame this fully on management.
     
    Last edited: Aug 9, 2023
    Ben_at_Work and AcidArrow like this.
  39. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    2,367
    This is all just a plot by the Amplify team to remind everyone that their Amplify Shader Editor is a damn good choice, it's been a damn good choice, and will continue to be a damn good choice.
     
  40. Ben_at_Work

    Ben_at_Work

    Joined:
    Mar 16, 2022
    Posts:
    79
    Testing a shader I built in 2022.3.1f1 (I can't test for other factors for obvious reasons):

    44s to load the shader.

    13s to create a multiply node.
    13s to connect an input to my graph.
    13s to connect the output to my graph.
    14s to delete the input.
    13s to delete the node.

    10 minutes 51s to undo deleting the node.

    The amount of time it takes to undo is so unacceptably long that I had jokingly written down "5 minutes" while I was waiting, only to have the actual time more than double it. I passive aggressively updated it to 10 minutes as I stewed, thinking there was no way it'd reach that mark. This is Unity's Shader Graph.

    Based on Unity's priorities, hitting the undo button just 6 times is an acceptable use of one full hour of working time. An artist who has made a bad series of mistakes could spend an entire eight hour work day hitting the undo button a mere 50 times.

    I have so thoroughly trained myself to avoid the undo button that the true scale of the disastrous waste of time it involves was well beyond what I could imagine. When I first learned not to undo, I was only having to wait for a minute or two because the pain from forgetting that rule was too high. My habits with SG are permanently scarred with inefficient, backwards methods that disrupt the core workflow of any editor. My muscle memory reacts more viscerally to undoing in SG than to subdividing a million poly mesh on my decade old laptop. Every twitching hotkey-addicted neuron in my brain screams out "do not undo!" the nanosecond I make a mistake, because the cost is too high.

    Maybe the already bad performance has been multiplied by recent updates, but I can't afford to test it. It's been slow on anything larger than the smallest graphs for as long as I've been using it.

    Shader Graph was released in 2018. After five long years of additional development, it has not quite reached its lofty, futuristic goal of being able to undo safely.
     
    a17714375388 and Qriva like this.
  41. IffyJackson

    IffyJackson

    Joined:
    May 23, 2017
    Posts:
    21
    I mean, serious question to all of us:

    _Why_ and _what_ are we even paying our subscription fee for? Almost (if not all) native Unity tools are broken, unfinished, non-performant under the "LTS". So again, what exactly are we paying for?
     
  42. BenCloward

    BenCloward

    Unity Technologies

    Joined:
    Jul 15, 2021
    Posts:
    137
    Could you please post this shader so that we can reproduce your results? Also, can you describe your hardware? Laptop vs desktop? Mac/PC? CPU Speed? RAM? Etc. The more information you can provide, the more helpful it will be to resolving the issue.
     
  43. IffyJackson

    IffyJackson

    Joined:
    May 23, 2017
    Posts:
    21
    Hi Ben,

    Appreciate your reply and willingness to dive into this issue. Thank you.

    What I think everyone here tries to make clear is that the incredible non performant state of Shader Graph requires little to no effort to reproduce. It is one hundred percent of the time reproducible. 100%.
    1. Create a Shader Graph
    2. Add a couple of nodes, make it 50+ or more
    3. Add 5 or more keywords (though this step might not be even needed)
    4. At this point, see how adding / removing nodes / connections is working. You will notice significant tens of seconds of delays.
    5. And please try to undo also. This allows you drink a few cups of coffee in the meantime.
    Last thing, it seems to happen on every hardware. I'm on a Macbook Pro M1 Max, which should be more than powerful enough. The opening post was also mentioning pretty powerful hardware. Although I can't imagine the horror on older hardware.
     
    BEBADBOI likes this.
  44. BenCloward

    BenCloward

    Unity Technologies

    Joined:
    Jul 15, 2021
    Posts:
    137
    Thanks, MonoMiker. I understand your frustration and will follow your steps, but I would also still like to get an answer from Ben_at_work since he listed some very specific actions and very specific times - which are the most useful.
     
  45. Ben_at_Work

    Ben_at_Work

    Joined:
    Mar 16, 2022
    Posts:
    79
    PC Specs:
    • OS = Windows 10
    • GPU = 3080Ti
    • CPU = Ryzen 9 5950X
    • RAM = 64GB
    Unity Specs:
    • Version = 2022.3.1f1
    • Pipeline = URP
    • Target = VR for Quest 2
    • Shader Variant Limit = 2048, Auto Add Block Nodes = True, Enable Deprecated Nodes = False.

    Shader Graph Packages
    :
    • Shader Graph Markdown 1.5.0 (Active)
    • Shader Graph Extensions: Debug Value 1.0.2 (Unused)
    • Shader Graph Easing 2.0.1 (Unused)
    I'll send the shader itself in a private message for your internal use. It's a custom water shader, and the heaviest in my current library to really crank those delays up. I've listed the SG packages that I can recall because it's possible they somehow contribute. I assume this thread is broadly hinting at multiple different sources of lag that people experience, though it seems consistent that everyone's graphs accumulate towards eventual impracticality as the complexity grows.

    If this was an issue that I'd only recently noticed, rather than being present for the entire time I've used SG, I'd be less fascinated by the band wagon of frustration we've got going here. When I built up my latest skill set and app usage, I deliberately chose Shader Graph over Amplify because I took it's creation as a sign that Unity recognized how far behind some of its built-in tools had gotten compared both with its own community's efforts and its competitors. Setting aside possible compatibility differences which may have forced the decision, I think I regret that choice more than I stand by it. I've been burned much worse (Quixel's Photoshop plugin being blocked by Adobe's purchase of their rival, Substance, for example), but it's always frustrating to find yourself committed to a weaker or delayed ecosystem for development.

    The added pressure, deserved or not (we're maybe a tiny bit biased), is to increase the odds that we're wrong. I'd rather be caught pitchforking at the wrong door in the long term since that means I can work harder. For my purposes, SG gets me just far enough to finish the job, but only if I stand on one foot, touch my nose, and recite the alphabet backwards. If I can just skip those rituals I'll be able to turn my attention towards what's next, rather than what's missing.
     
    Qriva, AcidArrow and IffyJackson like this.
  46. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,631
    Now everyone, Unity has everything they asked and more. Grab some popcorn and let’s all watch the months go by while very little changes. (I foresee one update where Unity declares the issue fixed and the 10 minute undo times become like… 7minutes).

    F***ing prove me wrong Unity, I beg of you.
     
    Last edited: Aug 10, 2023
  47. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,023
    You had luck with 10 minutes. I wait 50min for Coppy 1 node from shader to shader and I gave up.
    Standalone:
    12th Gen Intel(R) Core(TM) i9-12900KF 3.20 GHz
    GTX 3060
     
    Last edited: Aug 10, 2023
  48. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,023
    No, no specific actions just a big shader. More nodes it have a slower shader graph is. Adding new property in big shaders took 2-10min
     
  49. Shack_Man

    Shack_Man

    Joined:
    Jun 7, 2017
    Posts:
    372
    Amplify Shader Editor is on sale... just bought it because my trust in Unity to fix this any time soon is close to 0.

    Might also be a good time to learn HLSL. Not going to spend one more minute in Shader Graph. It already felt so clunky and limited when you come from other software, but instead of catching up it went off the cliff.
     
  50. IffyJackson

    IffyJackson

    Joined:
    May 23, 2017
    Posts:
    21
    Ben, I'm putting my trust in you. I've seen a couple of your YT vids and you genuinely seem like someone who has plenty of knowledge about shaders and node-based graphs.

    Please rile up your team as soon as possible. Make this an absolutely top priority. The incentive should be fully there, since Shader Graph is a flagship feature for Unity.

    Show us Unity has passion, the motivation and respect towards us developers by keeping us all in the loop on your team's progress. Make this a prime example of how you are going to prove us all wrong who have been deeply disappointed about a lot of native Unity features.
     
    BEBADBOI likes this.