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 160132

Summary: Editor chokes on large java source files
Product: java Reporter: scott_pavetti <scott_pavetti>
Component: NavigationAssignee: Tomas Zezula <tzezula>
Status: RESOLVED FIXED    
Severity: blocker CC: issues
Priority: P3 Keywords: PERFORMANCE
Version: 6.x   
Hardware: All   
OS: Windows Vista   
Issue Type: DEFECT Exception Reporter:
Attachments: File that causes unresponsive IDE
messages.log
Profiler screenshot

Description scott_pavetti 2009-03-11 20:46:54 UTC
It takes the editor upwards of 30+ seconds to color (and whatever else happens in the background at this time) a source 
file.  (4GB Ram, Dual Core 2.0GHz Xeon Processor)  In the mean time, the IDE is unresponsive except for 
maximize/minimize window buttons.  Another file (725K source file causes the IDE to be unresponsive for an undetermined 
amount of time, and CPU utilization to go to 100%.  I quit waiting at 15 minutes.  During the unresponsive time 
NetBeans will not close, it  has to be terminated manually with a task manager.  I can edit this large file from 
another editor and have it be useful, as compilation does not seem to be affected.
Comment 1 scott_pavetti 2009-03-11 20:50:04 UTC
Created attachment 78075 [details]
File that causes unresponsive IDE
Comment 2 Vitezslav Stejskal 2009-03-13 12:18:29 UTC
Thanks for the file. I tried it in current dev build and it really makes the IDE froze, there is no deadlock though. I
managed to open the file successfully, but I had to close the Navigator window. Even after that there still were some
java tasks running on background (computing hints, maybe others), but the IDE was reasonably responsive. Could you
please capture several threaddumps when the IDE is frozen and attach them here. Also please attach your
<ide-userdir>/var/log/messages.log file.
Comment 3 scott_pavetti 2009-03-13 19:08:16 UTC
Created attachment 78163 [details]
messages.log
Comment 4 scott_pavetti 2009-03-13 19:10:02 UTC
I have submitted the messages.log.  Thank you for looking at this, I appreciate it!
Comment 5 Tomas Zezula 2015-03-10 10:20:16 UTC
The performance was improved for the attached file.
See attached screenshot.
The parsing + attribution of the file 1.752s (SourceCache.getResult)
Editor tasks (which are cancellable and do not block the IDE, when more priority requests come they are cancelled) 6.4s, most time taken by Hints: 4.9s

We may set some limit and disable some editor features when file is bigger then some limit. But it will not be very helpful as the long taking tasks are cancellable and disabling non cancellable parsing will disable all navigation.
Comment 6 Tomas Zezula 2015-03-10 10:21:02 UTC
Created attachment 152522 [details]
Profiler screenshot