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.
This bug was originally marked as duplicate of bug 198840, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related. Build: NetBeans IDE 7.3 Beta 2 (Build 201211062253) VM: Java HotSpot(TM) Client VM, 23.3-b01, Java(TM) SE Runtime Environment, 1.7.0_07-b11 OS: Windows 7 Maximum slowness yet reported was 17613 ms, average is 17613
Created attachment 128876 [details] nps snapshot
The html code completion needs to get an icon for each FileObject in a folder for which the CC is opened. To get the icon I just do: DataObject.find(fo).getNodeDelegate().getIcon(java.beans.BeanInfo.ICON_COLOR_16x16); Which IMO is the right way (please reassign back with some hint how to do that better/faster, if this wasn't the best way) I have no idea why it is so slow.
Getting an icon for each file in a folder is definitely something that may take a while. For example FolderChildren were modified in 7.2 to don't try to create DataObjects in EDT. Rather they create empty list of files and start computation of the icons on background. If you want your HTML completion to be fast, you need to do something similar. DataFolder.findFolder(fo.getParent()).getNodeDelegate().getChildren().getNodes(false/true) with false parameter you will get the result quickly, but the icons may be blank for a while. true parameter should guarantee correct result, but is going to be slow.
Created attachment 129216 [details] Proposed patch I've created a fix which requires some changes at the editor.completion side. Dusane please review as we agreed already and I'll possibly push it.
Proposed changes to editor.completion seem to be OK.
Thank you Dusane for the review. fixed in web-main#bb72712e8326
Integrated into 'main-golden', will be available in build *201212140001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/bb72712e8326 User: Marek Fukala <mfukala@netbeans.org> Log: #223290 - 17s - html code completion getIcon