GNOME Bugzilla – Bug 496355
Magnifier causes cpu usage much high.
Last modified: 2011-10-14 10:47:57 UTC
Steps to reproduce: 1. Enable Composite extension of Xorg. 2. Start full screen magnifier with "magnifier -f -m -z 1" 3. Run "top" command in a new terminal or start gnome-system-monitor and switch to Processes tab. 4. Move mouse cursor around and look into the CPU usage of Xorg and magnifier. Bug observation: The CPU usage of Xorg might be 70% high, and magnifier CPU usage might be 20% high. This bug can be found on both linux and solaris.
Copy this bug to Carlos. Carlos, would you please look at this bug? Thanks.
Hi Tim, I don't know when I will be able to look at this, but I will leave here some ideas that can be done/tried to improve CPU usage (I'm listing then from easiest to hardest, I think :-). 1. Improve X11 composite code - Although I improved it sometime ago, eliminating some sync calls, I believe that it still have room for improvements. 2. Improve how image cache is done - I believe that actually this is not being used due memory consumption. I also think that the actual way this is implemented can improved, since IIRC, the cache part update is the one equivalent to the actual viewport and the magnifier always fetch an Xserver image before verifying if the cache is up-to-date. I think that the code path here must be the following: When a Xdamage is received, update the cache and copy this part to the viewport (if it's in the viewport), so when panning we don't need to go to the Xserver, since the magnifier will always rely on the cache. 3. Change the render path - The actual one is inefficient in a composited desktop. We can use XRender to do magnification, instead of fetch an Xserver image and use Gdk-Pixbuf to magnify it. 4. Use OpenGL to compose and magnify - I believe that this is the most time consuming task and regressions must be avoid.
gnome-mag development has been stalled and it has been replaced by gnome-shell mag [1]. Maintainers don't have future development plan so i am closing all the bugs as WONTFIX. [1] https://mail.gnome.org/archives/gnome-bugsquad/2011-October/msg00001.html