anklang icon indicating copy to clipboard operation
anklang copied to clipboard

Slow rendering for devices with lots of properties

Open swesterfeld opened this issue 7 months ago • 4 comments

While working on LV2 support, I've observed that playing a song with devices that have lots of properties (like 100 or more) make the UI unresponsive during playback if the knobs are visible during playpack. I've used the Chrome profiler to find out why. It seems that Chrome has to update its layout all the time, so the large number of properties slow down the layout process. It can be avoided by disabling telemetry on the position view like this:

diff --git a/ui/b/positionview.js b/ui/b/positionview.js
index e74a7cd..1662126 100644
--- a/ui/b/positionview.js
+++ b/ui/b/positionview.js
@@ -123,6 +123,7 @@ class BPositionView extends LitComponent {
   }
   recv_telemetry (teleobj, arrays)
   {
+    return;
     if (!this.timer_text) return;
     const ds = "\u2007"; // FIGURE SPACE - "Tabular width", the width of digits
     const s3 = n => (n >= 100 ? "" : n >= 10 ? ds : ds + ds) + n;

so it seems that we need something better than we have now for implementing the mapping from telemetry to position view without triggering a relayout.

swesterfeld avatar Dec 05 '23 10:12 swesterfeld