Tk Source Code

Ticket Change Details
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Sep 9.
Overview

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

  1. 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!

  2. Change login to "marc_culler"
  3. Change mimetype to "text/plain"
  4. Change username to "Marc Culler"