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.
For a 'large' JS files (~4k lines) typing/deleting lags for a second or two. How to reproduce: 1. Open large JS file; 2. Copy a few code lines (if/for statment is prefered) 3. Paste those line in somewhere 4. Select half of the pasted block 4. Hit Delete button in keyboard 5. Notice CPU usage (it will drop after a few seconds). Product Version = NetBeans IDE 6.9.1 (Build 201007282301) Operating System = Windows 7 version 6.1 running on x86 Java; VM; Vendor = 1.6.0_21 Runtime = Java HotSpot(TM) Client VM 17.0-b17
Created attachment 102295 [details] Profiler data
Created attachment 102296 [details] NetBeans log file
A very brief analysis of the snapshot: Approximately 14 seconds spent in the JsHintsProvider resolving the JS expressions. This involves more than 1000 invocations of JsTypeAnalyzer.expressionType() which involves about 700 lucene index queries. What I can spot suspicious here is the amount of the index queries. I believe each query involves a disk IO operations so this could be definitively improved by some caching. Another question is how accurate are the type analyzer result and hence how useful are the hints themselves. Definitively disabling the javascript.hints module would help here a lot.
Waiver request for >48 hours -> switch to waiver http://wiki.netbeans.org/WaiverProcess
Also requesting waiver for 7.0.1.
Approved.
There were done a few changes that should improve this behavior. I have tested it with uncompressed dojo.js file (11 thousands lines) and I can not see the behavior as is described here. For now I'm closing as fixed, but if you have still problem with it, please reopen. It can happen that the exact case is not by the correcting catch. Thanks.
I tried with 7k lines js file and it seems to work fine, verified Product Version: NetBeans IDE 7.1 (Build 201112071828) Java: 1.7.0_02; Java HotSpot(TM) Client VM 22.0-b10 System: Linux version 3.0.0-13-generic-pae running on i386; UTF-8; en_US (nb)