GNOME Bugzilla – Bug 625115
Changes notified from backends aren't propagated to UI
Last modified: 2013-09-14 16:53:27 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.)
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.
Created commit 06b76f1 in eds master (2.31.91+)