This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 194258 - [api] use collector callback for multi task data retrieval
Summary: [api] use collector callback for multi task data retrieval
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.0   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 200408 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-25 13:43 EDT by Robert Elves CLA
Modified: 2008-04-13 20:56 EDT (History)
0 users

See Also:


Attachments
mylyn/context/zip (4.11 KB, application/octet-stream)
2008-04-10 18:18 EDT, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Elves CLA 2007-06-25 13:43:10 EDT
Eugene pointed out on bug#194140 that multi task data retrieval could potentially use up a lot of memory if many task data are requested from server. Investigate changing api to use ITaskCollector interface and push data direct to offline storage bypassing caching etc.
Comment 1 Eugene Kuleshov CLA 2007-06-25 14:00:34 EDT
Tood bad it will stay in 2.0. I am not sure how we would migrate api into new implementation...
Comment 2 Mik Kersten CLA 2007-06-25 15:16:44 EDT
No need to migrate API, this can happen with a catching policy change.
Comment 3 Eugene Kuleshov CLA 2007-06-25 15:28:08 EDT
Mik, I am not sure I understand. The point of this call is to retrieve data for multiple tasks, and current API forces it to store all of them in memory and return that collection as a result parameter. How would you tweak caching policy to avoid getting those hits and still have single request for multiple tasks?
Comment 4 Robert Elves CLA 2007-06-25 19:42:56 EDT
Yes, without changing this method to use a collector capable of persisting each task data as it is received, we are stuck loading all into memory.
Comment 5 Eugene Kuleshov CLA 2007-06-25 20:55:47 EDT
So, what is the plan for API migration?
Comment 6 Mik Kersten CLA 2007-06-25 21:23:15 EDT
What I was referring to is that if we need to we can create something like an OfflineBufferredSet that encapsulates the write/cache policy.  I am not saying that this will necessarily be a better solution than deprecating that method and providing a new one, but it is possible.  For the typical case the actual impact of putting things in memory should be minimal thanks to our safety threshold (5K hits) and the reasons Rob mentions on bug 194140.
Comment 7 Mik Kersten CLA 2007-06-25 21:25:20 EDT
In addition, when we do get to this I do not want us to implement a naiive implementation that causes a large number bunch of file writes just to free up allocation of a few MB of memory allocation because that could reduce performance on a typical machine in the common case.  So we should do some profile of the cache before settling on any solution.
Comment 8 Eugene Kuleshov CLA 2007-06-25 21:58:43 EDT
(In reply to comment #6)
> What I was referring to is that if we need to we can create something like an
> OfflineBufferredSet that encapsulates the write/cache policy.  

That won't work, because data set is created by connector. Using collector API would allow to manage buggering and caching on the framework side.

> For the typical case the actual impact of putting things in memory should be 
> minimal thanks to our safety threshold (5K hits) and the reasons Rob mentions on bug 194140.

Hmm. I unzipped all zips from by bugzilla offline folder (which is ~20Mb zipped now) and got ~120Mb xml file. I guess there is a lots of formatting in there, but it is still quite lot of data (if loaded in memory).

(In reply to comment #7)
> In addition, when we do get to this I do not want us to implement a naiive
> implementation that causes a large number bunch of file writes just to free up
> allocation of a few MB of memory allocation because that could reduce
> performance on a typical machine in the common case.  So we should do some
> profile of the cache before settling on any solution.

Sure thing. That is another reason to use collector API instead returning collections. So, stuff can be tuned on the framework.
Comment 9 Robert Elves CLA 2007-08-24 14:36:31 EDT
*** Bug 200408 has been marked as a duplicate of this bug. ***
Comment 10 Steffen Pingel CLA 2008-04-10 18:18:02 EDT
Done. Added collector parameter to AbstractTaskDataHandler.getMultiTaskData(). Rob, you might want to create a new bug for Bugzilla to incrementally "send" back TaskData objects as they are received from the repository instead of queuing them up in the connector.
Comment 11 Steffen Pingel CLA 2008-04-10 18:18:12 EDT
Created attachment 95603 [details]
mylyn/context/zip
Comment 12 Robert Elves CLA 2008-04-13 20:53:38 EDT
Created bug#226853 to address this in the Bugzilla connector.