[tomboy-list] Web sync getting all notes twice

Sandy Armstrong sanfordarmstrong at gmail.com
Tue Mar 30 18:34:34 PDT 2010


So, I finally took a look at this, and it seems SyncManager makes two
calls to server.GetAllNoteUUIDs, but it probably only needs to make
one, and save the resulting list.

In addition, it seems that SyncManager *always* calls
server.GetNoteUpdatesSince, even though at that point it already knows
the server's LatestRevision, and should be able to count on that to
assume that no updates exist if the server's LatestRevision is the
same as the client's last sync revision.  It should also be able to
make assumptions about what server.GetAllNoteUUIDs would return.

So in a typical autosync situation, for which there will be no updates
on the client or the server, we are still making *3* unnecessary GETs
to the /notes/ resource.

I'll try to get this fixed for 1.2.1.

Thanks for noticing this,
Sandy

On Wed, Aug 19, 2009 at 9:21 AM, Cornelius Hald <hald at icandy.de> wrote:
> Hi,
>
> the last days I was working again on the communication between Conboy
> and Snowy. For debugging reasons I had to do some network sniffing and
> it looks to me like there is maybe a small bug in Tomboy. It might also
> be that I just misunderstood something, so here is what I observed.
>
> The communication between Tomboy (0.15.4) and Snowy is like this:
>
> Request 1
>> GET /api/1.0/ HTTP/1.1
> < api-ref, etc...
>
> Request 2
>> GET /api/1.0/root/ HTTP/1.0
> < api-ref, last-sync-revision, etc...
>
> Request 3
>> GET /api/1.0/root/notes/?include_notes=true&since=123 HTTP/1.0
> < notes array with content, etc...
>
> Request 4
>> GET /api/1.0/root/notes/ HTTP/1.0
> < notes array without content, etc...
>
> Request 5
>> GET /api/1.0/root/notes/ HTTP/1.0
> < notes array without content, etc... [again]
>
> Request 6
>> PUT /api/1.0/root/notes/ HTTP/1.0 [changed notes array]
> < all notes without content, etc...
>
> The requests 4 and 5 are exactly the same, also the responses are the
> same. The only difference between the two are different oauth headers.
> I've not looked at the code, so I don't know if this is intentional and
> I'm just missing something or if this would be a bug.
>
> Just thought I let you know, maybe someone wants to look into it.
>
> Cheers!
> Conny
>
>
> _______________________________________________
> Tomboy-list mailing list
> Tomboy-list at lists.beatniksoftware.com
> http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com
>


More information about the Tomboy-list mailing list