-
- Downloads
Remove old trackingRect during viewDidMoveToWindow
With long periods of usage, iTerm2 windows slow down while switching tabs. All of this time, apparently, was being spent in _CGSRemoveTrackingArea(). Instrumenting calls to {add,remove}TrackingRect showed unbalanced allocation caused by -[PTYTextView refresh] being called on tabs after they were removed from view. This "phantom refresh tracking rect" was then dropped/forgotten when the tab came back into view during viewDidMoveToWindow, which did not verify there was not already a tracking rect. While there may actually be a more underlying bug with "phantom refresh", this patch should solve the resource/speed leak by guaranteeing we never allocate an extra tracking rect.
Please register or sign in to comment