After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 625115 - Changes notified from backends aren't propagated to UI
Changes notified from backends aren't propagated to UI
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: general
2.32.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2010-07-23 12:05 UTC by Milan Crha
Modified: 2013-09-14 16:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
eds patch (9.94 KB, patch)
2010-08-24 12:16 UTC, Milan Crha
committed Details | Review

Description Milan Crha 2010-07-23 12:05:08 UTC
While working on some async rewrites in ema I realized that changes one sends from EBook/CalBackend aren't propagated to UI after e_data_cal/book_view_notify_complete is called, which makes the asynchronous fetching very hard to achieve.

Imagine situation:
 - EDataBook/CalView begun, return to it everything from cache, and indicate
   completeness of it

 - after some time, while view is still active, one receives an update from
   a server, and calls e_book_backend_notify_update/
   e_book_backend_notify_remove, thus expecting all data views being notified
   about new change, if appropriate for it, but no, bad luck, these changes
   are cached in the factory unless there's "enough" of them.

I would suppose to have a batched update based on time, rather than on a count, so nothing is missed. Or the combination, but definitely with some upper time limit, to not have missing items in the UI.

Say not keeping the cache for more than a second or three?

(My initial use-case, how I discovered this, was to populate view by cache and tell it it's complete, and then invoke new thread and fetch changes from a server, notifying about new contacts by e_book_backend_notify_update as expected, but as my contact list had only 8 items then I didn't see them, until next start of evolution, or calling notify_complete again, which is more than strange. I changed it to not "notify_complete" so early, which also allows to see progress messages in a status bar, but the above scenario about later updates still can be valid.)
Comment 1 Milan Crha 2010-08-24 12:16:20 UTC
Created attachment 168639 [details] [review]
eds patch

for evolution-data-server;

As we spoke with Chen on IRC, "just do it". So I did. I kept both items count threshold and timeout for buffers flush. It's two seconds.
Comment 2 Milan Crha 2010-08-24 12:17:37 UTC
Created commit 06b76f1 in eds master (2.31.91+)