GNOME Bugzilla – Bug 656709
Excessive updates being sent to server.
Last modified: 2012-07-19 09:43:58 UTC
We seem to be sending *loads* of "updates" to the server which look like this: <ItemChange> <ItemId Id="AAMkADQyOWY3OTVmLWEzODYtNDI5NS1hZmE2LThiMjhmYWRjOGQ0NwBGAAAAAAALWV8jNZpCRJWux9Gj6imzBwAxUrM3tYzfT6fnccKZasBfAAAALPtvAACnCUASyhvDT7JwON9NYNl4AAAAAUd9AAA=" ChangeKey="CQAAABYAAACnCUASyhvDT7JwON9NYNl4AAAABlbo"/> <Updates> <SetItemField> <FieldURI FieldURI="item:Categories"/> <Message> <Categories/> </Message> </SetItemField> </Updates> </ItemChange> This will be because of the 'OK, the change must have been the labels' bit in ews_synchronize_sync(). It's wrong to assume that. We should only include messages in our list if we really *are* going to send an update for them.
HI, Can you tell what kind of request was it or send a full request log? Thanks,
It has to have been an UpdateItem request, surely? Where else would we create a request like the above? I even pointed you at the part of the code which causes it...
Was looking in the wrong place. Found it under msg_update_flags() and already have a fix pending
Downstream bug report about the same from 3.4.3: https://bugzilla.redhat.com/show_bug.cgi?id=841443 User claims that after initial folder fetch there is huge CPU usage. I realized that it can be also caused by this bug, thus I looked deeply into it.
Created attachment 219214 [details] [review] ews patch for evolution-ews; With this patch the initial folder download does not leave message infos with CAMEL_MESSAGE_FOLDER_FLAGGED, thus on folder store these are not evaluated as being changed locally, and no upload of items is done. I also fixed ews_synchronize_sync() to not check CamelMessageInfo::dirty property, because it's there only for folder summary, indication of changes in message info itself is done only by the CAMEL_MESSAGE_FOLDER_FLAGGED flag.
Created commit 2122dc8 in ews master (3.5.5+) Created commit f91e481 in ews gnome-3-4 (3.4.4+)