Multiple ValueTree::setProperty() calls lags on MacOSX but performs fine on iOS

Hi there,

I am running into a strange issue that I can’t seem to understand.
Basically, I have a function that performs ~16 ValueTree::getProperty() and setProperty() calls to their own seperate ValueTrees simultaneously in a mouseDrag() call.
When performing this drag on MacOSX, it severely lags almost to a freeze, whereas on an iPad mini gen 2, it is quite smooth and acceptable.
The code roughly looks like this:

void mouseDrag() 
    for (auto child : parentTree) {
        child.setProperty(someID, child[someID], nullptr);

I think you need to run the profiler over it, that should give you an idea where all the time is being spent. I’d be surprised if it’s actually to do with the ValueTree methods, we do hundreds of these every drag.

1 Like