Bug 333969 - Synchronize tasks with open editors more often
Summary: Synchronize tasks with open editors more often
Status: RESOLVED DUPLICATE of bug 502035
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P2 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Colin Ritchie CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
Depends on:
Blocks:
 
Reported: 2011-01-11 07:53 EST by Robert Munteanu CLA
Modified: 2017-04-07 18:02 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Munteanu CLA 2011-01-11 07:53:15 EST
I've recently noticed that while Mylyn is very good for keeping notifications and discussions under control when dealing with a large number of tasks, it is not so when dealing with a conversation-style of flow, e.g.  a small number of participants posting comments in rapid succession.

In this case Mylyn seems to break the flow, since the query synchronisation interval is quite large. And I don't think that either synchronising all queries every 1 minute - which is still slow - is the answer. Neither is manually refreshing the task periodically.

Mylyn should provide a way to receive updates for faster for tasks which have a task editor is open.
Comment 1 Robert Munteanu CLA 2011-02-11 10:59:47 EST
This could be implemented as an additional task repository setting, false by default, with a name similar to  'Refresh tasks with open editors more often'. If this setting is active, then the tasks could then be refreshed every minute, which would be acceptable.

There would be no change to existing task repositories and users which do not need it would not be bothered one bit. And perhaps the open task refresh interval could be a user preference - I don't think it makes sense to make it per-repository.

I would also be willing to try and contribute a patch for this, given a little guidance.
Comment 2 Steffen Pingel CLA 2011-02-21 23:01:21 EST
Looking at the callers of TasksUiInternal.synchronizeTask() would probably be a good way to get started on this. The current API does not support this very well though as it does not provide a mechanism for push notifications or a lightweight way of checking if a task has changed on the repository. It would certainly be an interesting enhancement to the framework but would require some API design and effort to implement it.

On a high-level I am thinking of a connector specific per repository refresh session that is managed by the framework. It could eventually replace the pre/post synchronization hooks and hold the state of what is being monitored in the repository. All refresh requests would go through the session to allow a connector to handle them in the most efficient way and also provide hooks to notify the framework if a task has changed.
Comment 3 Robert Munteanu CLA 2011-03-02 16:58:55 EST
One approach to allow connector to push change notifications would be to pass a callback to the AbstractRepositoryConnector:

bc. 
public void setTaskChangeCallback(TaskChangeCallback callback) { 
    // empty default implementation
}

bc. 
public interface TaskChangeCallback() {
    void tasksChanged(Set<String> changedTaskIds);
}

The connector would then be able to notify the framework of changes.
Comment 4 Sam Davis CLA 2012-07-11 21:06:46 EDT
I think making this work well would also require being able to refresh the task editor without disrupting the user, i.e. without changing the scrolling, expansion, or selection state of any of the controls and without disabling the task editor during the refresh. But it would be useful even without that as long as it just set a message informing the user that there were incomings and didn't force a refresh of the task editor.

It seems like it would be quite simple, and useful, to make this work without doing it the "right" way, i.e. without trying to make it efficient or creating an API or involving the connectors at all. You would just need a job that would periodically refresh all open tasks from configured repositories.
Comment 5 Sam Davis CLA 2016-04-05 16:30:29 EDT
I think I may have a POC of this somewhere.
Comment 6 Sam Davis CLA 2017-04-07 18:02:19 EDT

*** This bug has been marked as a duplicate of bug 502035 ***