MATLAB Answers

Andreas
1

Bad raphics performance on retina display (early 2015 13inch Macbook Pro)

Asked by Andreas
on 15 Apr 2016
Latest activity Commented on by Mike Garrity
on 20 Apr 2016
Hello everybody,
I realized some strange graphics performance issues on my work computer, which is a early 2015 Macbook Pro. I use a Thunderbolt display as an external screen.
Animated graphics seem to draw much slower on the native retina display than on the external screen, when plugged in. After some tests with bench() (mean value of 10 runs), I can tell how much worse it is on the retina.
Time in seconds for graphics tests with Thunderbolt display:
2D: 0.7363 3D: 0.7025
Time in seconds for graphics tests with Retina alone:
2D: 1.6315 3D: 1.6474
This behaviour is present on all the 5 Macbooks I tested. All of them have MATLAB 2015b installed. One of my colleagues still has 2015a on his computer, which has exactly the same hardware like mine and there the performance on the retina display is much better. What happened? Is this a known issue?
Best regards

  0 Comments

Sign in to comment.

1 Answer

Answer by Mike Garrity
on 15 Apr 2016

I haven't benchmarked that particular machine, but whenever I do benchmark a graphics system, I start with the diagram I discussed in this post on the MATLAB Graphics blog .
As you can see, once the system is in the region I labeled the "pixel limit", the performance is pretty much linearly proportional to the number of pixels per primitive. On a Retina display, there are more pixels per primitive. So it's not surprising that you might see a slowdown on the order of what you're seeing.

  2 Comments

Thank you for your answer, but I think it does not help so much. I am aware that the performance depends on the number of pixels per primitive, that can be seen just by resizing any figure window running an animation. The Retina display shows a scaled representation of a high-resolution picture, so that a standard figure window occupies more pixels on the Retina display, and thus the performance is worse. Only thing is, MATLAB didn't seem to be aware of that before 2015b:
With version 2015a of MATLAB I do not see a decrease of performance if I switch from Thunderbolt to Retina display. Something must have changed between the two MATLAB-versions and it should have to do something with OpenGL and how Mac OS renders high resolution 2560x1600 on Retina and then displays it at the size of 1280x800 with sharper edges.
For less complicated 2D-animations, it helped to switch the renderer to painters, which actually runs faster in this case on the Retina display.
Curiously, the graphics also forget to become slow when I have the Thunderbolt display plugged in and just shift the graphics window to the Retina display, where it is displayed at the same actual size as in only-Retina mode. I can also disconnect the Thunderbolt display while running an animation and there is no decrease in performance when the picture reappears on the Retina display.
In case you want to confirm the issues on a similar machine, here are my specs:
  • Macbook Pro 13 inch, early 2015
  • 2,9 GHz Intel Core i5
  • 16 GB 1867 MHz DDR3
  • Intel Iris Graphics 6100 1536 MB
What changed in 2015b is that MATLAB Graphics actually started supporting Retina displays. Before that, it was generating the image at low resolution, and then MacOS was scaling that low-res image up to the resolution of the monitor.
That means that the R2015b version is actually rendering 4 times as many pixels as the R2015a version.

Sign in to comment.