Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 219189

Summary: Mark Read/Unread should run outside of the UI thread
Product: z_Archived Reporter: Eddie Galvez <egalvez>
Component: MylynAssignee: Steffen Pingel <steffen.pingel>
Status: RESOLVED DUPLICATE QA Contact:
Severity: minor    
Priority: P4 CC: robert.elves
Version: 2.2   
Target Milestone: 3.0   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
converted mark read/unread to job
none
mylyn/context/zip none

Description Eddie Galvez CLA 2008-02-15 17:47:38 EST
Mark Read/Unread should run using one of the progress/job mechanisms, as it appears to easily take a long enough amount of time that the UI blocks in a very obvious manner. My query that I am marking read is about 2000 tasks, by the way.
Comment 1 Eddie Galvez CLA 2008-02-15 17:56:18 EST
Btw, I would not mind the priority lowering because, to be honest, this is mostly a concern when setting up queries for the first time (like a query grabbing all issues assigned to me, but that I want marked read).

If you guys think it worthwhile, perhaps I'll file an enhancement to make new queries automatically mark everything that it adds as Read during the first query synchronization.
Comment 2 Steffen Pingel CLA 2008-02-16 14:43:59 EST
 (In reply to comment #1)
> If you guys think it worthwhile, perhaps I'll file an enhancement to make new
> queries automatically mark everything that it adds as Read during the first
> query synchronization.

I like that idea. It could be a check box in the new wizard for creating new queries.

*** This bug has been marked as a duplicate of bug 208924 ***
Comment 3 Steffen Pingel CLA 2008-02-16 14:44:21 EST
Oops, wrong bug.
Comment 4 Steffen Pingel CLA 2008-02-16 14:44:39 EST

*** This bug has been marked as a duplicate of bug 205358 ***
Comment 5 Eugene Kuleshov CLA 2008-02-16 15:02:18 EST
Steffen, that is a wrong bug again
Comment 6 Eugene Kuleshov CLA 2008-02-16 15:04:45 EST
Just to clarify. Running actions in background job and performance/io issues seem way to different.
Comment 7 Eddie Galvez CLA 2008-02-16 23:01:14 EST
This bug got quite some activity ... again, my bug report is strictly only to say that I think the mark read/unread action should do what it can not to run directly in the UI thread to ensure responsiveness.

I'll open a seperate enhancement request for making the new-query wizard "mark imported tasks as read".
Comment 8 Steffen Pingel CLA 2008-02-16 23:23:10 EST
The reason that marking tasks is slow is due to the I/O caused by the operation. This is particularly noticeable when marking many tasks read. The solution may require moving the I/O operations to a job and providing progress indication or a redesign of the data model to avoid doing I/O and making the operation fast. I would like to address either solution on bug 205358.

*** This bug has been marked as a duplicate of bug 205358 ***
Comment 9 Eugene Kuleshov CLA 2008-02-17 00:38:44 EST
Created attachment 89924 [details]
converted mark read/unread to job

Steffen, whil in a long run your ideas are good, the fix to address UI responsiveness is much simpler (see attachment) and it provides immediate benefits without significant api refactorings.
Comment 10 Eugene Kuleshov CLA 2008-02-17 00:38:47 EST
Created attachment 89925 [details]
mylyn/context/zip
Comment 11 Steffen Pingel CLA 2008-02-17 02:01:01 EST
Yes, that patch could work. If you want this to go into the 2.3 release I would recommend that you add it to the next meeting agenda and ask Rob to review it. I am not sure what the implications of running the actions on a non-UI thread are. 
Comment 12 Eugene Kuleshov CLA 2008-02-17 12:59:57 EST
Rob, can you please take a look at this?
Comment 13 Steffen Pingel CLA 2008-02-29 02:34:47 EST
The patch did not make it into 2.3. Further improvements will be tracked on bug 205358.

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