High CPU usage
|User & Date:||marc_culler 2019-04-16 21:07:21|
- Change icomment to:
@nab -- OK. I looked at it. And, amazingly enough, I found something. It turns out that it is not Apple's fault that [NSView drawRect] is always called with the full bounding rectangle of the NSView. It is my fault. I think I might have fixed that in the branch bug-06f3922f8b.
When I removed all of the strange and unnecessary nesting from the script you posted in the report and simply gridded all of the buttons as children of one frame then I was not able to get the CPU usage much above 10% even when wildly moving the mouse around like no real user would ever do. The same kind of crazy mouse action in a terminal window uses 5% CPU. So I don't think we are going to do much better than that. I'll attach the simplified script.
WARNING: this needs a lot of testing in a lot of different situations before it can be merged. We need to make sure we aren't creating new graphics artifacts. My first attempt would create garbage when moving canvas items quickly. There could be lots of other things like that.
- Change login to "marc_culler"
- Change mimetype to "text/x-fossil-wiki"
- Change username to "Marc Culler"