low OpenGL performance in Max6 ?

Feb 4, 2013 at 5:02pm

low OpenGL performance in Max6 ?

Running the exact same patch in Max6 and Max5 yields very different performance results.
If I use the jit.gl.render help patcher, set the metro to 15ms and go fullscreen, I get :
- in Max 5.1.9 : about 40 fps
- in Max 6.0.8 : only 30fps when going fullscreen.

That is quite a big performance loss…
Is there any way to tweak some option to reach Max5 performance ?
What is the reason for this loss ?

This was tested on a macbook pro 2.8Ghz Intel Core 2 Duo with 4Go 1067MHz DD3 Ram, OSX 10.7.4

#66345
Feb 4, 2013 at 8:49pm

Hi Vincent,

The qmetro in the 5.1.9 help patch is set to ’20′, whereas in the Max 6 help patch, it is set to 33. When I either change the qmetro or use the old help patcher in Max 6, I see identical performance.

Let us know if you are still having performance issues.

Thanks,
-Ben

#238819
Mar 26, 2013 at 1:23pm

Hi Ben,

thanks for the reply.
Here’s a patch with observed performance on Max5 and Max6, with a MacBookPro 2.8GHz Intel Core 2 Duo with 4Go 1067MHz DDR3 RAM, OSX 10.7.4. Full screen was tested on a 2nd screen (ACER V173) 1280x1024px, 75hz

on max5 :
reduced window (320×240) : 59
full screen : 36

max6:
reduced window (320×240) : 59
full screen : 29

… which makes Max6 approx. 8pts behing Max5 performance.
Do you get the same hit ?


----------begin_max5_patcher----------
1631.3ocyZs0jhhCE9Y8WAK07niKIbQXeZ1eGSMkUDh1YFDXIgt6YmZ9uu4B
ffBZjFyZ0UCZBI4b9N2O3uVtvdW96Xps0eY8UqEK90xEKjCIFXQ82WXeD8db
JhJeL6cULVdl8J0T4UrTLi8yBrZOr2gxNXa8s5oKPr3WHYG1VhiYpm..fqcV
Y4sQbE5zbscIYUGIY78TdZfSCpNodiRRjTT9tu+YeawP+d4RwkUZxJY323qs
gUX32kjn8+bDyJys.NSmIU7kef3Zf+E7397LFk7uxsSBGCv5PcYcfcmcMCcT
tq1+cIAkNEP4iJeg9QB9cy7JeccmBubrJkQnojDbYCCQwL94yeJE0JoOfSWB
7BV1dE++qpR65J1F2MdpcKTbKxq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Ohs7ETR
d+lVZMZVQRSMO+4DiGxVywHXbbdUFujXKn0mANNh1uc0BvWU6RZkF0iCU8jz
UpRBpKH+dwK+AwKuApHMxH3EyZm0tqWk9JcpVGH6LYPfDbbCdr5RfPC42laf
N0VWo.D2Hi31FrwjNvZbDIceINra5R5P515Eca2Rf5dbK8GABblTyP0WUJvL
cCshh63+dkEK+DhLE8qfv0aDtghjNk.JELP3C6Ej4an7B5ZwM.aG4qXa2.ij
X..ZFsihbJQTNf0mDA9stxaLRmPT.OYqSi7ev5D.inSHeGZejWgVCp.j8Int
ULfG1aQ3+yTIkYO5rF1KywYIYQkWYPfJx9F3CN.uiwPw2HYI4uIvualEjNut
FOfzkTD3AmMMvjpYk3rDboRGCWhn3sw4o4k7hRD+A9X.Wchz9JUJ3lGKvYvr
psjP0oOoWV1760O8XSbavLDnpQw0YFAyfKAyvmpWX5oJxLzqKcSWlTdN8auq
hmOuIo0b9EMGcS2ldNRiQ60.0KaJ5kMD8BIftTCPCpI7ohZ7MF0DoA0D7TQM
hFcZHxITCxIxnTC7ohZ7epnFvsTbfFkbbuk+OeiRNd2hbLG5DngYk6SG0.LB
03piGPy4PFpE5XtP4PecvGCROZIubLG8nShWFLyKsBnaNxQmvDfHyRO2TbYN
sGfN4s659bQO.Cl5t+SUBg.OcfGCJtzxYn4R6A.djlWphjO6WFqfTN6WD6Y+
ZXO+WBKe298x+CXblkn.
-----------end_max5_patcher-----------

#238820
Mar 26, 2013 at 1:42pm

Ah, the joys of GL optimization. I’ve been pulling out my hair over this sort of thing way too often… Especially with multi-screen setups unexplainable things happen that seem to be bound to specific hardware configurations.

That said, your patch is a bit flawed. It will never exceed 60 (or 75) Hz because you have @sync 1 set on your window. That locks rendering to the refresh rate of the display.

Also, it’s rumored that fullscreen mode is less efficient than setting size and position explicitly. I haven’t verified that but below ‘s a revised patch anyway. Window size set to my MBP’s resolution, adapt to your needs. For second display, change the pos x y message so it starts at the first x coordinate of the 2nd display.

I’ll do the fps test when I get to my machine that also has Max 5 on it.

– Pasted Max Patch, click to expand. –
#238821
Mar 26, 2013 at 1:54pm

thanks dtr for the reply.
I am aware of the sync attribute limiting fps to the screen refresh rate. However, I was still far from the 75Hz of my screen to consider this as an issue.

I confirm that setting window size and position explicitely enhance the performance. Namely I get 40fps instead of 30fps with the patch previously posted, when going fullscreen in Max6. (fwiw, I tested on Max6.0.8 and Max6.1.0 ). Thanks for the info !

jit.gl.node yields better results when running an equivalent setup, but I get bugs with textures which make it an unsatisfying solution at the moment (plus the fact that i have to adapt a complex patch using this system). I’ll post the buggy behaviour from jit.gl.node in another thread.

#238822
Mar 26, 2013 at 2:28pm

Here are some fun reads on the (broad) subject:
http://cycling74.com/forums/topic.php?id=39038

http://cycling74.com/forums/topic.php?id=33696

Not sure how much of it applies to the current Max and OS versions.

#238823
Mar 27, 2013 at 4:21pm

Hi Vincent, et all,

This may be relevant to this discussion. We have discovered a problem with retina screens where Max is redundantly calculating 4 times the number of pixels for the display. This only affects retina machines.

To work around this, ‘Get Info’ on the Max Application and then check the “Open in Low Resolution” check box.

We’re looking at adding some kind of compatibility mode to this, but in the meantime, if you are experiencing problems with performance, running Max this way should help.

Thanks,
-Ben

#238824
Mar 27, 2013 at 6:21pm

thanks Ben for the hint.
However, I am not concerned by retina display…
I am heading toward jit.gl.node based system, but still get a lot of trouble.

Here are the features I am trying to get :
- Render each GL object to 0 to N destination.
- being able to switch dynamically between what is rendered where
- being able to render a destination to itself to achieve nice feedback effects (that one can easily and powerfully modulate with camera setting)
- have the jit.gl.node, jit.gl.camera, jit.gl.whatever in distant patchers (no patchcord between them)
- being able to attach texture from a texture bank to whatever object in whatever rendering pass

It is possible to do such things with to_texture method (cf examples from Andrew Benson and Vade) but jit.gl.node seems more optimized (especially to set various rendering parameters, like camera and such for each rendering pass).

Is there a tutorial somewhere to go this way with jit.gl.node ?

#238825
Mar 27, 2013 at 9:28pm

If you are looking for some jit.gl.node feedback examples, check out some of the more recent Jitter Recipes:

http://cycling74.com/category/articles/jitter-recipes/

#238826

You must be logged in to reply to this topic.