This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 199391 - FolderChildren.createNodes outside of EDT
Summary: FolderChildren.createNodes outside of EDT
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Data Systems (show other bugs)
Version: 7.1
Hardware: Other Linux
: P2 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
: 204934 (view as bug list)
Depends on: 199321 199603 212510
Blocks: 199308 199648
  Show dependency tree
 
Reported: 2011-06-14 07:20 UTC by Jaroslav Tulach
Modified: 2012-05-15 21:51 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2011-06-14 07:20:38 UTC
As bug 199136 shows, creating DataObject can take a lot of time (due to underperforming getMimeType). The general fix is to move the creation outside of EDT.

Implemented as 8b479b68575f, but there are many regressions. They need to be addressed for 7.1:

> If I understand correctly, this is going to be an effectively incompatible
> change for anyone using FilterNode to produce a refined view of a folder tree.
> Which is a lot of people. Right?

> If so, I think this fix has to be modified; perhaps only activate it for files
> which "look" remote (see bug #159628).

> Causing AE in LibrariesNode, see issue #199308
> Incompatible change.
Comment 1 Jaroslav Tulach 2011-06-16 10:14:00 UTC
core-main#c90de9858e34
Comment 2 Quality Engineering 2011-06-17 14:39:19 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/c90de9858e34
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #199391: Documenting the change is not fully compatible. Printing a warning when somebody accesses DataObject in the node from AWT (not always a problem). Also meanwhile made much more compatible.
Comment 3 Jesse Glick 2011-11-07 16:43:14 UTC
I would suggest clarifying in the apichanges.xml entry and/or the stack trace "Ineffective..." that if you were merely looking for a DataObject.class in a Node's lookup and calling getPrimaryFile, which is pretty commonplace, all you need do is look for FileObject.class instead. See contrib #6494a399b320 for example.
Comment 4 Quality Engineering 2011-11-08 15:38:31 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/541c077e8ede
User: Jesse Glick <jglick@netbeans.org>
Log: Look for FileObject, not DataObject, in Node.lookup if possible.
http://statistics.netbeans.org/exceptions/messageslog?id=535195
INFO [org.openide.loaders.FolderChildren...src.main.webapp]: Ineffective since #199391 was implemented
java.lang.Exception: Find for ...\src\main\webapp\index.jsp@...
	at org.openide.loaders.FolderChildren$DelayedNode.convert(FolderChildren.java:451)
	at org.openide.loaders.FolderChildren$DelayedNode.convert(FolderChildren.java:399)
	at org.openide.util.lookup.InstanceContent$ConvertingItem.getInstance(InstanceContent.java:316)
	at org.openide.util.lookup.AbstractLookup.lookup(AbstractLookup.java:421)
	at org.openide.nodes.FilterNode$FilterLookup.lookup(FilterNode.java:2114)
	at org.openide.nodes.FilterNode$FilterLookup.lookup(FilterNode.java:2114)
	at org.netbeans.modules.maven.j2ee.web.WebAppFilterNode$WebAppFilterChildren.createNodes(WebAppFilterNode.java:169)
Comment 5 Jaroslav Tulach 2011-11-11 14:01:35 UTC
*** Bug 204934 has been marked as a duplicate of this bug. ***