Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318019 - [performance][context] any user interaction takes minutes of CPU load for large projects if Focus is enabled in Package Explorer
Summary: [performance][context] any user interaction takes minutes of CPU load for lar...
Status: RESOLVED WORKSFORME
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P1 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Shawn Minto CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 267143
  Show dependency tree
 
Reported: 2010-06-25 13:14 EDT by Missing name CLA
Modified: 2011-05-28 13:36 EDT (History)
3 users (show)

See Also:


Attachments
Threaddump while waiting for a file to be opened (31.97 KB, text/plain)
2010-06-25 13:14 EDT, Missing name CLA
no flags Details
CPU usage while opening a file (24.35 KB, image/png)
2010-06-25 13:15 EDT, Missing name CLA
no flags Details
Threaddump while activating a task (1/5) (27.33 KB, text/plain)
2010-06-28 12:19 EDT, Missing name CLA
no flags Details
Threaddump while activating a task (2/5) (26.85 KB, text/plain)
2010-06-28 12:20 EDT, Missing name CLA
no flags Details
Threaddump while activating a task (3/5) (42.84 KB, text/plain)
2010-06-28 12:20 EDT, Missing name CLA
no flags Details
Threaddump while activating a task (4/5) (20.89 KB, text/plain)
2010-06-28 12:21 EDT, Missing name CLA
no flags Details
Threaddump while activating a task (5/5) (20.30 KB, text/plain)
2010-06-28 12:21 EDT, Missing name CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Missing name CLA 2010-06-25 13:14:57 EDT
Created attachment 172787 [details]
Threaddump while waiting for a file to be opened

Any user interaction if Mylyn is enabled such as
- activating a task
- opening a file
- expanding a tree node in the Package Explorer
takes literally minutes (1–3 minutes depending on the interaction) where the UI is frozen and Eclipse is using up one CPU core completely.

As a workaround one can disable Focusing in the Package Explorer, but of course one loses one of the more important features of Mylyn by this.

I had 2 small projects and 2 large, monolithic projects open. Project size seems to matter, because I don't see the issue with only small projects open.

Eclipse version: 3.5.2
Comment 1 Missing name CLA 2010-06-25 13:15:49 EDT
Created attachment 172788 [details]
CPU usage while opening a file
Comment 2 Shawn Minto CLA 2010-06-25 13:59:34 EDT
Looking at the provided stack trace, it seems that the automatic linking is being the problem.  Without a task active, can you enable the "Link with Editor" feature in the package explorer (the toolbar button with the arrows pointing both ways) and see if you have a similar problem (especially when the Package Explorer is collapsed and you use "Open Type" or "Open Resource" to open a file).

Since it seems to be frozen for a long time, do you think that you could get a few stack dumps during that time frame so we can see if this is what is causing the problem or if that just happened to be running when you took the stack dump?  Also, how large are the monolithic projects so that I can try to reproduce this here?
Comment 3 Missing name CLA 2010-06-28 12:19:59 EDT
Created attachment 172917 [details]
Threaddump while activating a task (1/5)
Comment 4 Missing name CLA 2010-06-28 12:20:37 EDT
Created attachment 172918 [details]
 Threaddump while activating a task (2/5)
Comment 5 Missing name CLA 2010-06-28 12:20:54 EDT
Created attachment 172919 [details]
 Threaddump while activating a task (3/5)
Comment 6 Missing name CLA 2010-06-28 12:21:10 EDT
Created attachment 172920 [details]
Threaddump while activating a task (4/5)
Comment 7 Missing name CLA 2010-06-28 12:21:26 EDT
Created attachment 172921 [details]
 Threaddump while activating a task (5/5)
Comment 8 Missing name CLA 2010-06-28 12:38:16 EDT
(In reply to comment #2)

Thanks for your quick reply!

I have taken a series of threaddumps with one large project open. It was the first time of opening the Task List and activating one local task. They are each about 1 minute apart.

If "Link with Editor" is enabled and Mylyn disabled (by closing the Task List), files are opened quickly in about 2 seconds.

One of the large projects has 22000 Java-Files in about 7300 directories (didn't count the packages exactly).
Comment 9 Shawn Minto CLA 2010-07-06 17:45:53 EDT
Thanks for all of the additional stacks and the testing!  After looking at this more, it seems that the problem is due to the focusing trying to load the Java model for these large projects which can take a lot of time.  I will have to look into this to see if there is anything that we can do to improve the performance for projects this large.
Comment 10 Missing name CLA 2010-07-27 12:14:34 EDT
An upgrade to Eclipse 3.6 with Mylyn 3.4 did not make a difference.
Comment 11 Mik Kersten CLA 2011-02-25 18:12:11 EST
Steffen: Could you summarize how bad or common this problem is?  Wondering if we need to schedule it for 3.6.
Comment 12 Missing name CLA 2011-05-06 12:44:59 EDT
I have upgraded to 3.4.3 and this problem is totally gone. Everything is superfast as it should be. I'm happy! I close the issue as fixed, because noone else reported it.