Arrange layers tanks performance when window port is connected using UI layers

Steps causing the bug to occur

  1. Open and run attached composition
  2. Observe somewhat sluggish but usable behavior (might be related to text usage or the Mac it’s being run on)
  3. Open sub-composition
  4. Attach Window input port to Window port of arrange node
  5. Start main composition
  6. Observe slow/unusable behavior
  7. Looking at the event flow the arrange node fires events constantly

Have you found a workaround?

Don’t attach window cable to arrange node

Other notes

  • Vuo version: 2.2.0
  • macOS version: macOS 10.15
  • How severely does this bug affect you? It prevents me from completing a specific task with Vuo.

I assume the arrange nodes aren’t optimized for using them with UI layers (which they are super-useful for). Having an option to “Allow changes” for the Window port type could perhaps solve this?

UI (4.19 KB)

Could it be that the VuoRenderedLayers_update function is computationally expensive to run with UI nodes and arrange nodes? Or that it somehow returns the renderingDimensionsChanged as true when using UI elements?

The “normal” sluggishness has to do with text size in combination with the window resolution so I guess it’s the hardware and not Vuo.

After even more poking around, it seems like this is a sub-composition related issue. As the Allow Changes node won’t accept a window input, there doesn’t seem to be a workaround for this.

1 Like

The simplest workaround would be to leave the Window port of the Arrange Layers in Column node unconnected. The Window input is only needed if the layers to be arranged are Real Size layers, which the slider layers are not.

As you figured out, the problem has to do with subcompositions. In the original composition, the Arranged Layer output port of the subcomposition is a trigger, which fires events whenever any of the Make Slider nodes do. Adding the Window cable within the subcomposition changes the Arranged Layer output port so it’s no longer a trigger. Within the subcomposition, the events fired from the Make Slider nodes are now blocked (because they overlap a published input’s event stream). Instead, the Arranged Layers port now outputs the Window events.

Although there’s room for improvement for clarifying event flow through subcompositions — for this specific case, maybe the best solution would be to avoid the problem by removing the Window input from Arrange Layers in Column. The reason it needs the Window port is to calculate the layout for Real Size layers. But if it could defer the layout until render time, then it would no longer needs the Window port.

1 Like