[
http://jira.jboss.com/jira/browse/JBIDE-1896?page=comments#action_12403920 ]
Snjezana Peco commented on JBIDE-1896:
--------------------------------------
I have tested the VPE editor for memory leaks. The following functions have been tested:
- opening and closing the editor
- editing and CA
- editing and D&D from the Palette view
- editing within the Properties view
- the Outline View
I have found and fixed several memory leaks.
1) IDropCommand adds the DropData class to the execute (DropData data) method, but
doesn't clear it.
2) The ValueHelper class is created in different places in the code. It contains a
reference to the visualEditor and sometimes causes leaks. I have changed that code in
order this class to be used as a local variable.
3) Wizards of the type IDropWizard register the PropertyChangeListener class, but
don't remove it.
4) The TagAttributeWizardPage class registers PropertyChangeListener and 2 selection
listeners, but doesn't remove them.
5) TagAttributeComposite registers PropertyChangeListener and doesn't remove it.
6) The ConfigurableContentOutlinePage.dispose() method calls
setConfiguration(NULL_CONFIGURATION) (line 412)
This method tries to remove keyListener (line 506), DragSourceListener (lines 534-543) and
DropTargetListener (lines 544-553). Because the control, fDragSource and fDropTarget
widgets have already been disposed, these listeners aren't removed.
Since this is a bug in the Web Tools project, one way to fix it would be to copy the class
and fix removing these listeners.
7) WTPTextJspKbConnector (line 85) registers a node adapter, but doesn't remove it.
8) Line 133 in the XulRunnerEditor
// getWebBrowser().removeWebBrowserListener(XulRunnerEditor.this,
nsIWebProgressListener.NS_IWEBPROGRESSLISTENER_IID);
is commented because it doesn't work on Mac. I have replaced the code with:
if (!Platform.getOS().equals(Platform.OS_MACOSX)) {
nsIServiceManager serviceManager = Mozilla.getInstance().getServiceManager();
nsIWebProgress webProgress = (nsIWebProgress) serviceManager
.getServiceByContractID("(a)mozilla.org/docloaderservice;1", // $NON-NLS-1$
nsIWebProgress.NS_IWEBPROGRESS_IID);
webProgress.removeProgressListener(XulRunnerEditor.this);
}
in order the listener to be removed on Linux and Windows.
Since the way of adding this listener has been changed within JBIDE-1329, it is possible
that the new code works on Mac as well.
9) The VPE editor's objects aren't released when using the following case
scenario:
- close all editors
- open some file in the VPE editor
- select some attribute in the Properties view (it can be an attribute of some object from
the Package Explorer view)
- close the editor without activating it
The editor's objects will be released by opening some new editor which doesn't
have to be the VPE editor.
This happens because global actions (Save, SaveAs, etc) aren't deactivated when
closing the editor.
This behavior is the same for any editor (Java editor, for instance). In my opinion, this
is a minor issue.
The changes are in the following plugins:
org.jboss.tools.common.model.ui
org.jboss.tools.jst.jsp
org.jboss.tools.jsf.ui
org.jboss.tools.vpe
org.jboss.tools.vpe.xulrunner
There are some more issues (AttributeDescriptor objects are leaked sometimes, an issue in
the VpeCreatorUtil.getFacetType() method ...).
It would be good to commit the above mentioned changes before fixing the issues with
AttributeDescriptor, VpeCreatorUtil.getFacetType()...
JBDS1.0 Massive Memory Leak using JBoss Tool HTML Editor on .XHTML
files
------------------------------------------------------------------------
Key: JBIDE-1896
URL:
http://jira.jboss.com/jira/browse/JBIDE-1896
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: Visual Page Editor
Affects Versions: 2.0.0.GA
Environment: * Windows XP Professional
* Fresh installation of JBDS 1.0, no additional plugins/features updates etc.
* Working from a freshly seam-gen generated project
Reporter: Andy Conn
Assigned To: Max Andersen
Priority: Critical
Fix For: 2.1
Attachments: display.xhtml, edit.xhtml, JBDS259.zip, JBDS259a.zip, menu.xhtml,
NewPartDetail.xhtml, template.xhtml, test.xhtml, testdiv.xhtml
Please refer to the disucssion @
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134003#...
Original Post:
There seems to be a major memory leak making the JBoss HTML Editor completely unusable.
Mem usage in Task Manager shows as follows:
* 111,448 On a fresh open of Jboss Dev Studio
* 189,144 Opening an .xhtml file (in visual/source mode) using in the "Jboss HTML
Editor"
* 197,932 Removed a blank line from the source & saved
* 207,180 Inserted a blank line in source & saved
* 211,168 Inserted a space in source & saved
* 357,392 Inserted & Deleted a blank line in source: repeat 20x (no saves in
between)
Clearly there is some dramatic memory problem here.
Note:
1) The problem does not seem to occur when mode is set to "Source"
2) The memory is not released even if the HTML Editor is closed
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira