GNOME Bugzilla – Bug 342463
[ximagesrc] performance improvement
Last modified: 2007-05-11 16:13:34 UTC
Please describe the problem: Before the addition of the damage extension code, ximagesrc copied the entire screen out per frame, which was bad. Now, with the damage code we copy out the area of the screen that was damaged for each set of damage that occurs. If the screen is changing faster than the framerate, this will probably be worse than pre-damage. So, instead I changed it so that only use the union of all the damage that happens between frames. Patch to follow. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 65929 [details] [review] Reduce XGetImage()ing during high screen activity Note that I ignore SHM in this patch. It appears to be harmless from the previous code's behavior, and I would love for someone to show me that SHM vs not is actually a bottleneck in this stuff.
Thanks for the patch, looking at it and testing it.
Eric, I have an issue. In some cases unioning would be slower, take havinga normal gnome desktop and you have a cpu usage monitor on the top panel on the right which obviously changes and a lot of activity on the bottom left of the screen. The union in that case would be almost the whole screen. It would be nice to deduct based on the damage rectangles whether to union or to get them all. What do you think?
From my previous reading of the damage code, with my patch if I typed a character in this text box and my cpu monitor updated between the last frame and this one, I should receive a couple of rectangles covering the areas drawn to, not a single bounding box. Do you actually see the bounding box behavior you described instead? In fact, the unavailability of just-report-bounding-box behavior has been a significant issue for X server pixmap migration optimizations.
zaheer, can you reply so we do not get publicly shamed in blogs in the future ? :) Also adding julien for commenting.
why am i involved in that ? What is the blog story ?
The merging of this patch has been on my freetime todo list for a while. The addition of the ability to specify a certain part of the screen to capture in ximagesrc has made this patch non-trivial to merge. Any help in updating the patch to current head would be appreciated.
Ok finally got this merged. Thanks for the patch, Eric.