Forums > Jitter

Wow, getposition sure is slow (or what am I missing?)

September 25, 2012 | 1:25 pm

Hi, attached you will find two patches: A-poly.maxpat and B-multiple.maxpat

Basically they both produce a bunch of spheres itching their way down the screen and wrapping back up.
A-poly.maxpat uses a poly~ that loads voice.maxpat.
B-multiple.maxpat uses a jit.gl.multiple.

Now, I noticed that A-poly.maxpat is a lot slower than B-multiple.maxpat. Through some testing, I think it has to do with the getposition message.

A-poly-notgetposition.maxpat is a modified version of A-poly.maxpat that does not use the getposition message. Notice the huge difference in framerate!

This is very strange. Any cues on how to optimize the A-poly.maxpat?


September 25, 2012 | 1:28 pm

Here is the attachment.

Attachments:
  1. polyvsmultiple.zip

September 25, 2012 | 3:39 pm

hello. it is not the getposition call, but the flonum box after your unpack.
remove that and the FPS is back to normal.

remember to remove any unnecessary GUI objects first, when trying to optimize FPS, especially inside a poly~ abstraction.


September 25, 2012 | 7:03 pm

Wow. I thought that when patchers where hidden that they did not update their GUIs!
So if I understand, all GUIs are updated even if they are not visible? Ouch.

Thank you once more.


September 25, 2012 | 7:11 pm

If UI objets are hidden in presentation mode, do they still eat CPU?


Viewing 5 posts - 1 through 5 (of 5 total)