the profile is becoming a bit of a cpu hog

Lubomir I. Ivanov neolit123 at gmail.com
Wed Jan 7 13:10:02 PST 2015


win64, dual core cpu

general performance drops are observed in both official binaries and
my local debug build.
of course we can wait until *actual* users complain, instead of me.
just a report, as i don't have time to fix any of that ATM. perhaps
later this month...

i guess this is mostly in Tomaz' field.

with the recent addition of the mean depth line and text, i've noticed
further increase of cpu usage when hovering the profile. so i've
started "profiling the profile" to see what are the main causes for
the high cpu usage 30%.

i've realized it's a multitude of things and all contribute a
millisecond or two so that it takes a while to render a frame in the
UI thread. to explain the issue i'm describing, imagine the mean depth
line jumping at 500ms intervals instead of smoothly following the
mouse.

1) the main hog is ToolTipItem - 20%
perhaps elements can be re-used instead of re-creating them each time
the mouse moves.
also, we can possibly get rid of the animation and store some of the
VALUE / 2 operations in VALUE_D_2 consts. etc...
not sure how well this will work without testing it.

2) those extra 10% are caused by the new InstantMeanDepthLine::mouseMoved()
as it calculates based on the running average each time instead of
using a lookup table.

lubomir
--


More information about the subsurface mailing list