On 2015-01-14 22:47, Henrik Brautaset Aronsen wrote:
Henrik Brautaset Aronsen wrote:
An individual 0-100% progress for each dive is OK.
Ignoring the fact that it currently never reaches 100%, a progress for
each individual dive is not as good as a global progress for the entire
operation. With the individual progress you still don't know how long
the download will take. Of course that's better than nothing, but not
optimal either.
The problem was that the progress disappeared after a few dives had
been imported. With Dirk's debug line it becomes obvious why:
[...]
progress 1539 of 1540
progress 1540 of 1540
progress 0 of 16777219
progress 3 of 16777219
progress 147 of 16777219
16777219 is 2^24 + 3. Sounds magical.
That 2^24 - 1 (or 0xFFFFFF) is the worst case value I mentioned in my
previous email. The Petrel protocol contains a 24bit length in the
request packets. But because a dive has a variable length and that
length isn't known in advance, you are supposed to set this field to its
maximum value. The extra 4 bytes are protocol overhead.
Jef
_______________________________________________
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface