Page MenuHome

UI: Don't render missing linked eevee material previews, avoid freeze
ClosedPublic

Authored by Julian Eisel (Severin) on Nov 17 2022, 5:08 PM.

Details

Summary

Issue from the Project Heist production:
Opening the material selector after reloading files would cause long UI freezes, because some linked in materials don't have the preview stored in the source file. So Blender would keep rerendering it after every file load.

Implemented here: Skip rendering previews of linked IDs, unless it's a solid mode render (which is usually fast). Not having a preview is not a big issue, a long reoccuring UI freeze is.

I also have a proof of concept patch for saving the rendered icons in the OS thumbnail cache. But I'm not happy with the implementation, the related code is already a mess and introducing this makes it considerably worse. This workaround is simple and reasonable enough.
Hopefully shader compilation won't be so much of an issue in the near-ish future anymore, the workaround can be removed then.

Diff Detail

Repository
rB Blender
Branch
master
Build Status
Buildable 24695
Build 24695: arc lint + arc unit

Event Timeline

Julian Eisel (Severin) requested review of this revision.Nov 17 2022, 5:08 PM
Julian Eisel (Severin) created this revision.
Brecht Van Lommel (brecht) requested changes to this revision.Nov 17 2022, 5:30 PM

I'd disable this for all render engines, it can be just as slow with Cycles, especially if materials are using high res images.

Also not clear why the OpenGL backend would be checked specifically, Metal or Vulkan would not avoid this.

This revision now requires changes to proceed.Nov 17 2022, 5:30 PM

I'd disable this for all render engines, it can be just as slow with Cycles, especially if materials are using high res images.

I think being a bit slow is fine, but I think for other engines it doesn't usually freeze the UI? But I wouldn't mind disabling it there too, if you think it's better.

Also not clear why the OpenGL backend would be checked specifically, Metal or Vulkan would not avoid this.

I heard some conflicting information about how much shader compilation would change with Vulkan, but I was under the impression we would at least be able to compile shaders off the main thread, leaving the UI responsive. Again, this is my main concern currently.

I think UI freezing is just one problem, loading heavy texture files every time is an issue as well. Vulkan or Metal can help but it's no guarantee.

I'd rather have it disabled for all renderers.

  • Disable preview renders for linked IDs for all render engines
  • Cleanup: Unused include
This revision is now accepted and ready to land.Nov 22 2022, 4:56 PM
Julian Eisel (Severin) edited the summary of this revision. (Show Details)Nov 23 2022, 11:43 AM