Dive Merging Issues

Tomaz Canabrava tcanabrava at kde.org
Sat Nov 16 15:05:51 UTC 2013


On Sat, Nov 16, 2013 at 8:46 PM, Linus Torvalds <
torvalds at linux-foundation.org> wrote:

> On Sat, Nov 16, 2013 at 2:22 PM, Tomaz Canabrava <tcanabrava at kde.org>
> wrote:
> >
> > I'v found one issue while trying to work on the list, to test if it was
> > broke or anything, and I got stuck on it all day long.  But it's like
> this:
> >
> > open subsurface and load files dives/test23.xml && dives/test27.xml
> > merge dive 22 with dive 28
> >
> > subsurface freezes.
> > I'v tracked it down to 'scene()->itemsBoundingRect()' taking too long,
> > and usually this means that we inserted a *lot* of crap in there,
> >
> > some time later, it came back to life, and I had a dive with more than
> 11000
> > minutes.
> > I'm attaching a screenshoot:
> >
> > So, what should I do on that regard? Dirk, Linus?
>
> The attached patch - or something very much like it - is likely the
> right thing to do.
>
> It limits merging dives to dives that have at most half an hour of
> surface time between them. That "half hour" is kind of a random thing
> to pick, but it's not horribly horribly wrong.
>
> It also changes the semantics of "merge selected dives" to something
> that actually works pretty well: you can select a whole range of
> dives, and it will merge only the ones that makes sense to merge. I
> tested it, and it's reasonable. I could select all my dives from one
> dive trip, and then do "Merge selected dives", and it did the right
> thing (Dirk: I selected the florida trip, and it merged the aborted
> "missed the trench" dive with the _actual_ "trench" dive).
>
> I'm _slightly_ hesitant about this in the sense that maybe some crazy
> person actually would want to merge dives with more than half an hour
> of surface time between them, but it really doesn't seem to make much
> sense.
>
> So with that slight caveat:
>
>   Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
>
> and it obviously fixes your test-case (by making "Merge selected
> dives" just not do anything for it).
>
> Comments?
>
>
Worked, thanks a lot.  :)
Now I'll just add a nice message with a <BLINK> tag to warn the user when
he tries to merge a dive more than >30 min difference.



>                     Linus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20131116/ffb6457c/attachment.html>


More information about the subsurface mailing list