High CPU usage
|User & Date:||marc_culler 2019-02-13 13:23:24|
- Change icomment to:
To Apple's Window manager a Tk window consists of one NSWindow containing one NSView. Tk is responsible for drawing its widgets inside the View. When you move your mouse inside the View, Apple asks the View to redraw a damage region, by calling the drawRect method of the view. As I understand it, what happens is that Apple passes the bounding rectangle of the View to its drawRect method. So Tk responds by redrawing everything that meets that rectangle, i.e. by redrawing everything inside the window. If Apple were to ask for updates only in a small region containing the old pointer image, then maybe we could avoid sending expose events for the children which do not meet that small damage region.
It is true that I have not spent any time trying to do this sort of optimization, since other things were more urgent. Maybe we could do better. If you can figure out how to get more detailed damage information from Apple, please let us know!
- Change login to "marc_culler"
- Change mimetype to "text/plain"
- Change username to "Marc Culler"