after staring for a while at the callgrind log, i realized it did similar to what i got from a windows tool. my opinion is that both tools somehow don't register well the amount of ToolTipItem calls we get and the actual CPU usage they do. so i did some more manual investigation...
On 14 January 2015 at 21:30, Tomaz Canabrava <[email protected]> wrote: > Lubomir, > > Now we reuse the Tooltip / Pixmap items without deleting it. > Also a lot of uneeded calls were moved / removed. > > It stills uses a high cpu, but in my tests it goes from 25% to ~16% > this is odd, for me after 001-004 it still caps at 25%. but these are changes in the right direction. i've tried doing similar to what you did in 004, and without the expand() call in addTooltip() i was able to get it down to 16%. the animation is also very heavy - setRect() is called *many* times during the animation and it creates new paths for the background and border each time. instead of paths (vector), i think the background + border should be in QGraphicsPixmapItem where the pixmap is a paint device and QPainter->drawRect() is used? the problem as i've described in previous emails is that it's a multitude of things that slow it down: - many heap allocations / de-allocations per pixel distance moved - animation that re-triggers constantly - vector graphics - etc i suspect that if we rasterize the whole tooltip (i.e. use QPainter's methods on a surface) and disable the animation, it will be times faster. lubomir -- _______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
