xQuartz Extremely Slow Response
Asked Answered
D

1

9

I am not sure if this happens to every IDL users, but after upgrading to macOS Sierra and xQuartz 2.7.11, the response rate of my IDL widgets becomes unacceptably slow. I have the same program running on a Red Hat Enterprise Linux Workstation 6.6. It works smoothly. I used to have the same program SSH'd to OS X Mavericks before upgrading. With proper internet connection, it also worked fine. Unfortunately, I can't remember which version of the xQuartz I used.

I don't think the problem is related to SSH. I tried to both run the program with SSH and locally, the response rates seem very similar.

I tried to downgrading my xQuartz to 2.7.9, the problem was not resolved.

I tried to debug on myself, so I found the following link shares similar issue with me. https://bugs.freedesktop.org/show_bug.cgi?id=93430

The only way that can speed up the response now is to force set the output to 256 colors. But it breaks all of the color setups in my program.

All suggestions and questions are appreciated!

Draftee answered 17/3, 2017 at 20:22 Comment(7)
The only temporary fix I have found is to minimize the X-window or cover it with something else. The glitch is an error in communication between the IDL v8.5+ and OS X 10.11+. The easiest/best fix some of my colleagues found was to down grade IDL to v8.4 or earlier.Baryta
Thanks! I am using IDL 8.3 though...Draftee
So even v8.3 suffers from this issue? Hmm, perhaps my colleagues were mistaken. In any case, if you minimize or cover up the X-window it does help but it is absurdly annoying, I agree.Baryta
Yup, at least for GUI. Minimizing is not a choice for me... My program has intensive interaction with the cursor. I had to disable some functionalities. It is really annoying, but it seems to be the only solution for now...Draftee
I've noticed the same problem on an older 27" iMac with ATI Radeon HD 4670 256 MB. All X11 apps, even running locally on display ":0" are as much slower, and graphics operations in particular seem to be as much as 10 times slower at any operations involving any significant amount of screen space. I have not upgraded XQuartz -- I was running the very same XQuartz 2.7.11 on 10.6.8 and have only upgraded the main OS to 10.13.4. I may try re-compiling the xserver for native support to see if that helpsFalbala
ah-ha, there's a simple test in that open bug report: bugs.freedesktop.org/show_bug.cgi?id=93430#c13Falbala
I bumped into this problem as well recently and have not been able to find a good solution. I ended up installing parallels & Fedora and disabled 3D acceleration. This seems to work. If someone has a working alternative, please post a comment.Obit
S
2

If your IDL Widgets use Motif and XFT (antialiased fonts), then I have a solution, which can help speeding it up.

The underlying problem is in XQuartz and how it interacts with Mac graphical subsystem. All the Xlib calls which require round trip have become very slow after El Capitan. These would normally also slow down the response of X clients if you use SSH network access, but in this case, it also happens for programs, which run locally.

Since we can't fix the MacOS, we need "fix" our software and avoid the slow functions, which work just fine on other systems. And worked fine on older versions of MacOS.

First, in your own software, try to minimize the use of Xlib calls, which cause round trips: XSync, XInternAtom, XGetWindowAttributes, XQuery* (XQueryColor, XQueryBestCursor, XQueryBestSize, ...), XGetAtom...

This will help the performance in any Xt based toolkit. On normal X Servers, if running locally, it will not be a huge gain, but on XQuartz, it will make a big difference.

Finally, if you use Motif with XFT, you can download the latest Motif version from Sourceforge https://sourceforge.net/projects/motif/ and apply the fix described in this bug report: http://bugs.motifzone.com/show_bug.cgi?id=1715 which solves the issue of querying background color for every label drawn with XFT fonts.

You can observe the speedup I have obtained for my software in this video (Motif XFT text label fix) https://www.youtube.com/watch?v=Tg8KQrU0XkU and in this video (reducing XSnyc calls by using tiling to reuse shared memory buffer) https://www.youtube.com/watch?v=MNxnOeqiOCw

Sofa answered 26/6, 2020 at 11:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.