| Summary: | [performance][context] remove From Context hangs eclipse | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Alan Berezin <aberezin> | ||||||||||||
| Component: | Mylyn | Assignee: | Shawn Minto <shawn.minto> | ||||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||||
| Severity: | normal | ||||||||||||||
| Priority: | P2 | CC: | aberezin, davidmichaelkarr, jared, mik.kersten, shawn.minto, steffen.pingel | ||||||||||||
| Version: | 3.2 | ||||||||||||||
| Target Milestone: | 3.4.2 | ||||||||||||||
| Hardware: | PC | ||||||||||||||
| OS: | Windows XP | ||||||||||||||
| Whiteboard: | |||||||||||||||
| Bug Depends on: | |||||||||||||||
| Bug Blocks: | 275512 | ||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Alan Berezin
I forgot to note that one whole cpu core is maxed while the UI is hung. There is no indicator of a backround task. I dont know if this is related or should be reported separately but there is an intolerable UI performance issue with this workspace. If I have a task editor open (though not necessarily visible) for the current task, I see in the Context tab a section titled '51098 Invisble Elements'. It appears that whenever performing almost any edit in a java editor, an eclipse background task is spawned, appears in the Progress window as 'Updating Invisible Elements In Context Page', and lives for perhaps 200ms-2s. This causes an intolerable UI hang for a few hundred ms to a few seconds on almost any java edit making the whole UI unusable. It seems that if I simply close the task editor, the performance problem is gone. When I reopen the task editor, the problem doesnt immediately reappear but it may reappear if, in the task editor, I open the Context tab and then proceed to edit some java code. The simple workaround is to keep closed the task editor for the infocus task. But it took quite a bit of frustrating UI slowness for me to dig in and find this workaround. Shawn: Could you investigate? Alan, Would you be able to upgrade to Mylyn 3.2.1 and see if this problem still exists? There was a bug in 3.2.0 that could cause multiple expansions when removing from context which could affect the performance. I will give it a try tonight and let you know. I upgraded to Mylyn 3.2.1 and repeated the steps and eclipse hangs for approx 4 minutes (app doesnt even redraw the screen). The app seems to peg one whole core for that time. However, the app does recover. I dont know if this is better than before because my context is not exactly the same as the original test. I noted that there was only 1 'invisible' element in this case. Alan, About how many elements were you removing from the context? Also, did you have the context page of the task editor open when performing this? If so, could you try with the task editor closed and see if you get the same results? There were 2 elements being removed when I choose Remove From Context on the P1 project. The other project had approx 50 elements. I repeated the experiment with the task editor closed at the operation is fast, approx 2 seconds. I repeated it again with the editor open but not in focus and again it hangs. Let me know if there is any other testing you need. *** Bug 309555 has been marked as a duplicate of this bug. *** Created attachment 174112 [details]
Stack trace
Using Mylyn 3.4.0
I also have problems with the performance of Remove From Context (Project Explorer). My workspace is pretty large (100K+ files). At first I had one project with a context containing around 10 files. I created a second project (CDT), very big. Now if I activate my task, open my second project, the whole project tree is in light gray, so I have to remove from context which is very slow. Even if I do it folder by folder, it's still very slow. I'm attaching a stack but I don't think it's very useful.
I can confirm this bug as well. We have an extremely large, very, very old repository containing 87k files. We also use an unstable mainline approach to build management, so we have our mainline trunk and at this point I have 2 other branches checked out. So I have roughly 87x*3= +/- 250k files. Whenever I do a ^H search or an SVN update with an active task, the context absorbs every file that scores a hit in the search or that's updated via SVN. That's bad enough, but it's a different bug. The big deal is the fact that when I go to drop the extraneous files out of my context it can take up to 15 minutes for the process to finish. As the others noted, dropping individual assets is instant. Even dropping large folders (containing hundreds or thousands of items) out of the context is pretty quick. But if I try to remove one of the root folders or the project itself from the context I'm looking at 15 minutes or so. Also worth noting is the fact that the time doesn't seem to be any longer if I ctrl-click more than one build in the context window. So if I have files from 3 projects (where project == build, I check each build out into it's own project) in a context and I only want one of them there, if I ctrl-click the other two and do Remove From Context it's about 15 minutes to finish. If I do them one at a time, it's 15 minutes each. Also worth noting is the fact that we use Subversion, JIRA, Fisheye and Crucible and I have the Atlassian connectors for Mylyn installed. Created attachment 178105 [details]
patch
Here is a patch that I will commit to HEAD and backport that should improve the performance of this operation by batching the elements that are to be removed from the context and only notifying the change once. Previously, every element that was selected was processed separately.
Created attachment 178106 [details]
mylyn/context/zip
Created attachment 178461 [details]
patch
It turns out that there was another problem here. When removing items from context, it wasn't properly checked if the element was a part of the context or not, so it would try tro remove all elements in the tree that it could find. I want to do a bit more testing, but the test case that I added originally had 17 changes when the project was removed from the context and it was the only item in the context.
Created attachment 178462 [details]
mylyn/context/zip
patch applied to HEAD. Still need to backport. Applied to the branch. Looks like we are done here. A build with this fix is now available from the maintenance update site. |