Compute the volume meters only when editor is open

Hello, I would like my DSP to compute the volume meters, but only if an editor is open, otherwise this computation is useless and wastes CPU cycles.
Is there a hint that helps the Processor detect if there is an editor open?

You can use a read only parameter and set it to 1 when the editor is open and zero when the editor is closed.

To my understanding, there is no built-in way to know since the GUI and the RT (in VST3) have a clear separation.

But the main controller class is instantiated when the plugin gets created (and live for as long as the plugin) and so you could implement didOpen and willClose (this example shows how I overrode this method for my own purpose which is hiding/showing a modal dialog window if there is one opened) to send a message to the RT code to let it know that the UI is visible or not. Or you could use a read only parameter as Arne said from those same calls.

I can make it work with this method, thanks.
Reaper gave me an issue though, immediately after editor’s open, the controller’s performEdit fails. I seem able to work it around, by retrying it in the timer callback.