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

Sep 25, 2012 at 1:25pm

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

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?

#64500
Sep 25, 2012 at 1:28pm

Here is the attachment.

Attachments:
  1. polyvsmultiple.zip
#232685
Sep 25, 2012 at 3:39pm

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.

#232686
Sep 25, 2012 at 7:03pm

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.

#232687
Sep 25, 2012 at 7:11pm

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

#232688

You must be logged in to reply to this topic.