Uwatec Smart Z data download takes 1.5 hours for only 4 dives

Jef Driesen jef at libdivecomputer.org
Tue Dec 24 00:34:08 UTC 2013


On 24-12-13 02:39, Dirk Hohndel wrote:
>
> On Dec 23, 2013, at 4:29 PM, Linus Torvalds <torvalds at linux-foundation.org> wrote:
>
>> On Mon, Dec 23, 2013 at 1:25 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
>>>
>>> Linus - I don't remember why we did not use the fingerprint based
>>> implementation... can you remind me?
>>
>> The fingerprint was too much random crud to actually bother saving
>> without a sane format (it's just a byte blob). We do use it (to
>> generate the dive ID), but we have turned it into something much more
>> easily used for our needs.
>>
>> Also, it's useless for all the cases we had actually seen, so there
>> was very little reason to even worry about it.
>>
>> But I guess we could save it off for specific dive computers, and then
>> in libdivecomputer.c:event_cb(), we cowhen we've calculated the
>> deviceid, we could do something like
>>
>>     /* We don't have this right now, it would walk dives
>>      * starting from the most recent to the oldest */
>>     for_each_dive_reverse(dive, i) {
>>         for_each_dc(dive, dc) {
>>             if (dc->deviceid == devdata->deviceid && dc->fingerprint) {
>>                 dc_device_set_fingerprint(device, dc->fingerprint);
>>                 return 0;
>>             }
>>         }
>>     }
>>
>> or similar (the above is pseudo-code and the fingerprint isn't a
>> string, it would have to be a blob with length etc).
>
> Yeah, I was thinking of simply converting the fingerprint into hex
> digits and storing those and then put wrappers around that to
> transparently convert from one to the other.

Converting to a hex string should work fine. In practice the fingerprint is 
always very short, with at most a few bytes.

>> But this seems to be the first device to actually need it, and the
>> 1.5h download seems to really be due to some independent problem (ie
>> something is much too slow regardless).
>
> I seem to remember that we had a couple of other reports of devices that
> DOWNLOAD all the dives (before showing them to us) unless you tell them
> which dive is the last one that you have. I’m sure Jef will have the data on that :-)

There are two backends that require sending a timestamp to the device:

  * Uwatec Smart
  * Uwatec Memomouse
  * Uwatec Meridian

Without a fingerprint, these devices will always download all data.

(Note that there are more backends that always download all dives, but that's 
simply how their protocol works. There is nothing we can do about that. In such 
a case, the fingerprint will just filter out the old dives after the download, 
just like subsurface would do.)

There are also several backends, where using the fingerprint is more efficient 
(faster download) and/or more user friendly (accurate progress events):

  * All Oceanic (and compatible) devices
  * HW Frog
  * HW OSTC3
  * Shearwater Petrel

That's because these devices allow us to download an index first. This index is 
then used to decide which dives needs to be downloaded or not, before actually 
downloading them.

So this is not just a few devices. Of course the consequence of not using the 
fingerprint feature is not always as bad as the Uwatec case.

Jef


More information about the subsurface mailing list