Max performance degradation with UI objects: can you explain that?

sepulcky's icon

Hi folks!
A friend of mine has performed some benchmarks. Honestly, I don't have any explanation for that, as UI objects should be used only once in the end of the loop.
Does any one have a clue, why is that happening?

Screenshot-2015-05-27-14.56.19.png
png
broc's icon

The left outlet of uzi doesn't send a bang once at end of the loop but at each iteration.

mzed's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Here's some more stuff you didn't want to know. You can thank me later:

MH's icon

Wow I opened your patch on my Max7
and then everything in my computer got very slow.

Closing the patch didn't help
Tried to close Max7
Had to crash it.

Probably part of the reason why we have so
much problems ourselves with just saving a patch.

sepulcky's icon

@broc
Indeed! Seems like I'd overworked a bit and mixed up the outlets in my test…

@mzed
Omg, they load the CPU even when hidden, so it's not just the drawing routines. Thanks!

mzed's icon

Really? They take more than a few milliseconds, but no major load here. What are your scheduler settings?

sepulcky's icon

@mzed
I had two times less value with subpatched in your test, here are my numbers: 187, 82, 8.
But wait, your test has one flaw—it first resets *all* timers and then executes tests one-by-one, thus the performance metric accumulates readings of the previous test. I fixed it and got values 105, 71, 8—but anyway it is interesting, how UI object consumes the CPU even when it's not redrawing on the screen.

Max Patch
Copy patch and select New From Clipboard in Max.

The corrected test:

mzed's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Thanks. On your new one, the middle timer wasn't completely wired:

I think this just renforces how unreliable this test method is.

Jean-Francois Charles's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I like the version with the message box, too: