Tk Source Code

Ticket Change Details
Login
Overview

Artifact ID: 2e83b153e4ff4fdfe39eebde3303a2d2f9fb1afecb46ab5e761b1a981f176e6a
Ticket: 06f3922f8b89d455d589544d1008e6d8f48c6f49
High CPU usage
User & Date: marc_culler 2019-02-13 13:23:24
Changes

  1. icomment:
    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!
    
  2. login: "marc_culler"
  3. mimetype: "text/plain"
  4. username: "Marc Culler"