lightbox-viewer icon indicating copy to clipboard operation
lightbox-viewer copied to clipboard

Pathological slowness in Edit mode when object uses a modern avatar workflow

Open hai-vr opened this issue 7 months ago • 2 comments

In Edit mode, when the object being viewed uses a modern avatar workflow, the editor becomes pathologically slow.

The overzealous defensive approach in previewing in a way that leaves the original avatar unmodified/unmoved is likely a cause of this, but there are likely other choke points that need to be profiled and improved.

hai-vr avatar May 22 '25 19:05 hai-vr

The following issues were identified in Edit mode:

  • Copying the avatar in edit mode,
  • Preventing the avatar from flickering between each rendered lightbox,
  • Re-enabling the main avatar in the scene every frame,
  • Creating the camera component every frame.

In Edit Mode, avatars that have a large amount of systems in it are more likely to trigger this slowness. Base avatars are usually too simple to trigger this slowness.

Possible fix is to look into:

  • re-using the system being used in Retexturing Assistant to render in a separate scene,
  • re-using the system being used in Retexturing Assistant to detect objects being modified in order to selectively update the dependent objects.

hai-vr avatar May 23 '25 12:05 hai-vr

  • 2.4.1-alpha.1:
    • Copying the avatar in edit mode, -> Caching the avatar until it is modified or the reference changes
      • Partially incorrect, because this fails to account transform changes that aren't the avatar root
    • ~Preventing the avatar from flickering between each rendered lightbox,~ -> Unable to fix at present
    • Re-enabling the main avatar in the scene every frame, -> No longer disables the main avatar at all
    • ~Creating the camera component every frame.~ -> Not addressed yet

hai-vr avatar May 23 '25 19:05 hai-vr