Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 207384 - [performance] synchronizing JIRA query allocates too much memory
Summary: [performance] synchronizing JIRA query allocates too much memory
Status: RESOLVED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: 2.2   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-24 21:35 EDT by Steffen Pingel CLA
Modified: 2007-10-27 02:37 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Pingel CLA 2007-10-24 21:35:27 EDT
If I synchronize a JIRA query (with 9 tasks) the heap allocation will jump up and down. It will start at 80 MB, go up to 160 MB which triggers a garbage collection slowing down Eclipse significantly. This will happen for _each_ task that is synchronized.

The memory analysis shows that 93% of the garbage collected objects were allocated in  org.eclipse.mylyn.tasks.core.AbstractTaskContainer.getChildren() totaling almost 900,000 objects.
Comment 1 Eugene Kuleshov CLA 2007-10-24 23:50:52 EDT
Forget me if I'd state the obvious, but it does make sense in getChildren() check if there is no children and return Collections.EMPTY_SET and also maybe initialize children field lazily. The latter was one of the objections for patch on bug 199818
Comment 2 Mik Kersten CLA 2007-10-25 00:44:27 EDT
Great catch Steffen.
Comment 3 Steffen Pingel CLA 2007-10-26 21:48:05 EDT
A more detailed analysis showed that the memory is allocated by Axis so there is not much we can do about it. The reason it was affecting performance badly was bug 207652 which caused every task to get synchronized through SOAP on each background synchronization. With that bug fixed the JIRA connector will not make SOAP calls during background synchronization and it should be noted that we need to look out for that when changing the synchronization logic.

This performance problem still exists when manually synchronizing queries or tasks. It might be worth investigating a switch to Axis2 which is supposed to have better performance and consume less memory.
Comment 4 Eugene Kuleshov CLA 2007-10-27 00:04:16 EDT
Steffen, very interesting. Though I think it is still worth to fix stuff I mentioned in comment #1.
Comment 5 Steffen Pingel CLA 2007-10-27 02:37:06 EDT
Thanks for pointing that out. I have opened bug 207659.