Mobile build -786 small test

Jan Mulder jlmulder at xs4all.nl
Mon Feb 8 09:00:27 PST 2016


sorry, did not sent it to the list.

--jan

-------- Forwarded Message --------
Subject: 	Re: Mobile build -786 small test
Date: 	Mon, 8 Feb 2016 17:48:02 +0100
From: 	Jan Mulder <jlmulder at xs4all.nl>
To: 	Dirk Hohndel <dirk at hohndel.org>



On 08-02-16 17:26, Dirk Hohndel wrote:
> On Mon, Feb 08, 2016 at 01:28:05PM +0100, Jan Mulder wrote:
>>>> Also worth some profiling, I guess. IIRC the way the git save works is
>>>> that it creates the whole git tree in memory and then saves what is not on
>>>> disk. So that may cause the long duration with 750 long dives. But I would
>>>> need to spend more time to remind myself of how exactly this is done...
>> Did a little check with gprof, and that shows no real part in the code that
>> is responsible for this.
>>
>> Currently, I do not really understand all the rationale behind the save- and
>> cloud-management. I was under the impression that a "save" of a individual
>> dive only deals with the local cloudstorage tree, but it appears to do a lot
>> more.
> The local cache is a git repository. So if you "save" an edit, we create a
> new commit in that repository. That commit gets synced to the cloud either
> if you explicitly "upload to cloud" from the menu or the next time you
> open the app (I know, that's kinda counter intuitive).

Ok, that part I understood. But when not connected it does not create
the local commit.

>> Tried to mess with my log with the phone in airplane mode. I expected
>> this to work, as there is a local cloudstorage tree, but this results in
>> errors in the console "Don't save dives without loading from the cloud
>> first" (and the response when hitting the save button is nicely very fast).
>> For obvious reasons, I do not think this all works as intended.
> Yeah, that sounds wrong. Can you be a little more precise what you tried
> and what messages you got so I can reproduce this? The "don't save without
> loading" thing should not happen...

What I do is simple. Make sure that app is stopped. Put phone in
airplane mode (the easy way to prevent internet access). The application
log shows (correctly) "Cloud storage connection not working correctly",
but just before that also "766 dives loaded from cache". Now edit a
dive, save it. Nothing is shown to the user, but the application log
shows "Don't save dives without loading from the cloud first" on the
save action, and the data is not saved. It just seems to save correctly,
but it is not.

> And the saving is nice and fast most likely because it didn't save :-)

Exactly, that whats I read from the code. But I expected a commit to the
local cache that can be merged later when the connection to internet is
restored again.

best,

--jan



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20160208/7c29e6a6/attachment-0001.html>


More information about the subsurface mailing list