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.
Create a new empty XML document. Paste the following into it: -----%<----- <?xml version='1.0' encoding='UTF-8'?> <xfaces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"> | </xfaces-config> -----%<----- Type a character at the caret position (marked by "|"). As soon as "Please wait" pops up, continue to type quickly. The CPU will stay at 100% while you type, and the drawing of the typed text will be sluggish. If you type enough characters, the high CPU activity continues even after you stop typing. I am attaching three thread dumps which seem to imply that the culprit is the XML schema code completion. Apart from being slow, it tries to pop up automatically too often. Disabling the XML schema code completion module seems to fix the problem. I have seen KitsTrackerImpl.updateAndGet() very often in the thread dumps, not sure if that is normal behavior, so cc'ing Vita.
Created attachment 59303 [details] Thread dumps
This is strange, because I have not made any changes in the CC module that will cause this regression. I believe this has been caused by some underlying changes elsewhere. Anyway, let me take a look...
It is quite possible. I am getting the same behavior even when the XML schema CC is disabled. I have new stack traces, so I will file another issue against the editor. Still, XML schema CC autopopup does slow down the editor noticeably. For example, it activates even if I type whitespace -- I can see the "Please wait" popup being disabled for at least a second. The editor is quite faster when the XML schema CC module is disabled.
Filed also issue 131451.
I'm not sure where the problem is. I tried this with build 200803230003 and 200803241203 and I do not see any issue there. Seems like a recent change is causing this regression and I do see the sluggish behavior in any xml not just schemas.
On a fresh build from source, it looks better, however, my performance tests are not showing any improvement.
I am able to reproduce the high CPU usage while typing characters while "please wait..." is displayed but they are not drawn slowly. Also, even after typing a lot of characters CPU usage immediately returned to idle like state. System info: Product Version: NetBeans IDE Dev (Build 200803302302) Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119 System: Mac OS X version 10.5.2 running on i386; MacRoman; en_US (nb)
I guess the build doesn't have the fix for issue 131451. I just verified with a fresh source, this issue and issue 131451 has been fixed. Also my CC performance tests which regressed heavily (from ~8sec to ~80sec), came down to ~40sec after my fix http://hg.netbeans.org/main?cmd=changeset;node=42d49de611e2 and it came down to ~4sec after issue 131451 was fixed. I should rather say that, this issue depended on issue 131451.
Fix Verified Product Version: NetBeans IDE Dev (Build 200807101204) Java: 1.6.0_05; Java HotSpot(TM) 64-Bit Server VM 1.6.0_05-b13-52 System: Mac OS X version 10.5.4 running on x86_64; MacRoman; en_US (nb)