CPU hogging in the current master

Dirk Hohndel dirk at hohndel.org
Thu Sep 26 09:23:47 UTC 2013


On Thu, 2013-09-26 at 08:27 -0700, Linus Torvalds wrote:
> On Thu, Sep 26, 2013 at 8:18 AM, Linus Torvalds
> <torvalds at linux-foundation.org> wrote:
> >
> > I think this special case is actually solvable by just limiting the
> > TTS calculation to the length of the dive. I wanted to get rid of the
> > extreme sillyness before (it used to spend 50% of the time in just
> > calculating "pow()", now that's gone.
> 
> .. yeah, on the second dive we surface with a 79 min TTS value.
> 
> Which is interesting information, and I think it's ok to be slow for
> the case where the diver may actually die.
> 
> So rather than say "screw it, don't bother calculating TTS past the
> end of the dive", maybe we should just say "screw it, let's fix our
> test dives to not be quite so deadly.."

I disagree. I think it's good to have such an extreme case there - few
of us use Linux on a 4 year old Atom Netbook, but our users might. And
while they hopefully don't have dives like the ones in our tests, if we
can calculate those reasonably well on our typical machines, then normal
dives will work on their machines.

That said, with your latest code I think this is "fast enough" and I
don't think we need to go all that much further in our quest for
performance.

Now after our conversation outside of Starbucks at The Gardens Mall in
West Palm Beach I created an artificial dive file with 5000 dives. Now
that is BAD even on my fast laptop. So that is an area where I think
optimizations would be more useful - and if we were to change data file
formats, I'd like to do this together with the major version switch if
at all possible.

Have you looked into that?

/D



More information about the subsurface mailing list