GNOME Bugzilla – Bug 709625
Orca consumes increasing amounts of CPU in gnome 3.10
Last modified: 2013-10-11 09:39:04 UTC
Based on the following messages from the Orca list [1][2], it appears that some change in GNOME 3.10 is causing Orca to consume increasing amounts of CPU. As José indicated [2], when he downgraded Orca's dependencies and used Orca 3.10 in an otherwise 3.8 environment, the problem appears to have gone away. Nonetheless, I'm filing this against Orca until we know where the bug is. ==================================== After execute the following command: ps -eo pcpu,pid,user,args --sort=-%cpu| head -5 I found the following result: %CPU PID USER COMMAND 10.0 15987 vilmar /usr/bin/python /usr/bin/orca --replace 2.8 723 vilmar /usr/bin/pulseaudio --start 2.2 13801 vilmar pidgin 2.2 13824 vilmar /usr/lib32/skype/skype --disable-cleanlooks After I restart orca, wait a while and execute the same command, I found the following result: %CPU PID USER COMMAND 2.8 723 vilmar /usr/bin/pulseaudio --start 2.3 15743 vilmar /usr/bin/python /usr/bin/orca --replace 2.2 13801 vilmar pidgin 2.2 13824 vilmar /usr/lib32/skype/skype --disable-cleanlooks ==================================== I was using the following software: gnome 3.8 orca 3.10 atk 2.10 atk-spi2-atk 2.10 atk-spi2-core 2.10 python-atspi 2.10 pyobject 3.10 After I downgrade al the software except orca, the problem seems to be desappeared. ==================================== [1] https://mail.gnome.org/archives/orca-list/2013-October/msg00062.html [2] https://mail.gnome.org/archives/orca-list/2013-October/msg00018.html
Luke identified a commit in at-spi2-core that caused him similar problems. [1][2] Reverting that commit solved his issues. José just reported that reverting this commit has, so far, solved his issues as well. Transferring this bug to AT-SPI. [1] https://mail.gnome.org/archives/orca-list/2013-October/msg00081.html [2] https://git.gnome.org/browse/at-spi2-core/commit/?id=fbba09b26d6db7b6b4c889176f3769355da9c7fa [3] https://mail.gnome.org/archives/orca-list/2013-October/msg00088.html
Created attachment 256856 [details] [review] Proposed patch. If people could test this patch, then it would be really helpful. Jasper made that commit to fix a warning when somehow we ended up calling g_source_unref and passing NULL. It cleans up the code some, and I don't want to revert it and suspect that doing so would reinstate the warning, although I'm still unsure as to what was triggering it. However, now that I look again at the patch, I'm noticing that it removed a call to g_source_unref(), so perhaps that is somehow related. This patch should fix a leak, regardless.
Review of attachment 256856 [details] [review]: Aha. I was under the impression that returning G_SOURCE_REMOVE would detach the source and thus unref it.
So far no problems. I used all day and had no problems.
No problems here with the new patch, after several hours yesterday, and a couple this morning.
Comment on attachment 256856 [details] [review] Proposed patch. Thanks, Jasper. Calling g_source_destroy does remove the ref added y g_source_attach, but there is another ref created initially by g_idle_source_new() that wasn't ever being removed.
Thanks all for the testing. Pushed to master and gnome-3-10.