Bug 90365 - [refactoring] [move] OutOfMemory during Refactor>Move of methods.
Summary: [refactoring] [move] OutOfMemory during Refactor>Move of methods.
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 3.1 M7   Edit
Assignee: Tobias Widmer CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2005-04-05 16:16 EDT by Michael Valenta CLA
Modified: 2005-04-15 10:55 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Valenta CLA 2005-04-05 16:16:07 EDT
I am in the process of converting the Team/CVS plugins to use the Runtime NLS 
support. As part of the conversion, I needed to move several methods and 
fields from one class to another. I did this by selecting the methods and 
fields in the outline view and performing a Refactor>Move and accepting the 
default opetions. With a -Xmx512M I ran out of memory. With -Xmx768M the 
operation worked but the heap at one point reached 650M. This seems a bit 
excessive.

Here are the details of my setup:
 - Build id: I20050405-0800 (also with M6)
 - Workspace contains all (or most anyway) Eclipse plugins as source.
 - Plugin: org.eclipse.team.cvs.ui
 - Class: org.eclipse.team.internal.cvs.ui.Policy
 - Elements moved: all bind() methods and two bundle fields to an new class 
(CVSUIMessages)
Comment 1 Dirk Baeumer CLA 2005-04-05 17:33:17 EDT
Tobias, can you please try to reproduce this ? We should understand were we
spent this memory

Michael, if we take Team in source from M6 then this will still contain the code
you wanted to refactor. Right ?
Comment 2 Dirk Baeumer CLA 2005-04-05 17:48:05 EDT
Michael, one additional question: The Policy class is only referenced inside
org.eclipse.team.cvs.ui. Right ?
Comment 3 Dirk Baeumer CLA 2005-04-05 17:58:35 EDT
And one last question: in which package is CVSUIMessages located.
Comment 4 Dirk Baeumer CLA 2005-04-05 18:11:42 EDT
Tobias, something has changed here recently. Looking at the performance test
org.eclipse.jdt.ui.tests.refactoring.reorg.MoveStaticMembersPerfTests1#test_1000_10()
which simulates a move of a static field that has 10000 references (10 in 1000
CUS) shows that the VM space went up 364.5 % recently.
Comment 5 Dirk Baeumer CLA 2005-04-05 18:12:20 EDT
We should consider adding VM finger prints for the large move and rename
sceanrios to see those things earlier.
Comment 6 Michael Valenta CLA 2005-04-06 08:51:33 EDT
Yes, the unrefactored code is available in M6. I created the CVSUIMessages 
class in the same package as the source class (i.e. 
org.eclipse.team.internal.cvs.ui)
Comment 7 Michael Valenta CLA 2005-04-06 08:54:03 EDT
It turns out there was a couple of references in the org.eclipse.releng.tools 
plugin as well but other than that they are all within the 
org.eclipse.team.cvs.ui package.
Comment 8 Tobias Widmer CLA 2005-04-15 10:55:54 EDT
Visibility handling uses no asts anymore

Fixed > 20050415