CPU hogging in the current master
dirk at hohndel.org
Thu Sep 26 11:42:03 UTC 2013
On Thu, 2013-09-26 at 10:30 -0700, Linus Torvalds wrote:
> On Thu, Sep 26, 2013 at 9:23 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
> > 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?
> So I thought about it a bit. My main problem was that I couldn't come
> up with a really nice-looking format that was worth the pain.
> Can you send me the fake dive file, just so I don't have to fake my own?
It's >8MB as .xz (~190MB uncompressed). Should be on its way to your
> I do have a trivial patch to speed up xml matching, because I decided
> to try that one again. It's appended (the "-q" flag is to help time
> startup, it's not important otherwise, but we had something like that
> in the gtk version for similar reasons).
> The attached patch speeds up xml matching by creating the nodename the
> other way around (innermost entry first), which makes the diff
> painfully large, but 99% of that is just basically mindlessly fixing
> the comparison strings to match the new rule. Doing the name
> "little-endian" then makes it possible to skip the "len" argument and
> simplify the name comparisons, in particular exiting early for length
> The stupid xml parsing is still quite noticeable, but on my normal
> file it's now actyally less so than both dynamic linker startup costs
> (which are quite noticeable for the Qt build - more so than for gtk,
> iirc) and the tissue tolerance calculations for the first set of
> Of course, the problem with the xml file is that the cost scales with
> size of file. But I might be able to bring it down some more.
I have not had a chance to try your patch...
More information about the subsurface