On Mon, 2008-01-14 at 10:17 +0100, jiho wrote:
- The display is really slow compared to the X11 version (particularly
noticeable in the calligraphy tool for example). My guess is that it is GTK related but it can also be something on our end.
I've spent some time looking into this slowness. My understanding of the situation is that the problem arises because OS X (after 10.4) doesn't want to try drawing to the screen faster than the screen's refresh rate. Using the normal drawing area invalidation routines will allow OS X to coalesce the updates and then draw synced to the screen refresh. The way in which at least some of Inkscape's drawing works goes through a path in gtk-quartz that bypasses the "proper" routines and tries to draw faster than the refresh rate. This behavior blocks the current thread until the drawing has occurred, thus slowness. This information can be found on Apple's website in the "Drawing Performance Guidelines" document. And there is some discussion related to it at the Imendio (developers of gtk-quartz) forum.
There is a patch from one of the gtk-quartz developers that tries to address this problem, but I don't think it applies cleanly anymore, and a comment on bugzilla reports that it's in limbo because it led to other problems. I don't know what the other problems are.
Anyhow, I have applied the patch and changed a few other things, and now for the most part, in the brief testing I have done, Inkscape draws at what to me is basically an acceptable rate (on PPC 1.25 GHz G4). I have a rather crude implementation of tablet support and the calligraphy drawing works fine with that as well (though I don't have a tablet with tilt support, only pressure, so I'm not sure how well that works, if at all).
The only real obvious speed issue now is with creating a new object. When sizing the object initally the drawing is quite jerky. But once the object is there the resizing works fine. This is with a somewhat dated SVN version of Inkscape.
One more thing. You can use the program Quartz Debug, included with Apple's Developer Tools, to temporarily turn off beam synchronization, which will speed up the drawing in Inkscape, at the cost of possible image tearing. This is of course not a permanent solution to the problem.
Jonathan