sd-parseq icon indicating copy to clipboard operation
sd-parseq copied to clipboard

UI performance improvements

Open rewbs opened this issue 3 years ago • 1 comments

Initial thoughts for performance goals:

  • We'll work with a dataset with 2000 frames, 20 keyframes, and a range of interpolation functions over 10 fields with points at 10 keyframes each.
  • Baseline machine will be a 2018 macbook pro.
  • Rendering can remain a relatively expensive operation but should not exceed ~500ms.
  • The following non-rendering operations should always be snappy (<100ms):
    • Editing a value in the grid (without re-rendering).
    • Dragging a node in the graph (excluding re-rendering).
    • Changing the set of visible fields (should not trigger a re-render).
    • Changing any config values (excluding re-rendering).
    • Switching between percent and absolute values.
  • Rendering with the default/demo keyframe values should be <50ms, so that auto-rendering can be enabled by default.

rewbs avatar Nov 08 '22 09:11 rewbs

Benchmark document: https://sd-parseq.web.app/?importRemote=GUWZvNjsIQOWlB5HVb2uT3vEg4u1%2Fdoc-150564fc-2b1b-4909-a9e8-ad4eb832fc2d-1680568876457.json&token=827e46b4-bfe3-4c97-8ece-c10cbb3b2e07

As of v0.1.50, on a 2018 Macbook pro :

  • ✅ Rendering the default starting document file is <40ms.
  • ✅ Rendering the benchmark document is <400ms.
  • The following have no perceivable latency with the the benchmark document:
    • ✅ Editing a value in the grid (without re-rendering).
    • ✅ Dragging a node in the graph (excluding re-rendering).
    • ✅ Changing any config values (excluding re-rendering).
  • ℹ️ Switching between percent and absolute values around 200ms with the benchmark document, which is worse than our original goal but which seems acceptable.

However:

  • ⚠️ Changing the set of visible fields (which does not trigger a re-render) with the benchmark document is ~500ms so is too slow.
  • ⚠️ Typing in the prompt with the benchmark document field is unacceptably laggy.

So there are 2 journeys that require further tuning.

rewbs avatar Apr 04 '23 00:04 rewbs