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.
Summary: | IDE freezes because of slow file system access from EDT | ||
---|---|---|---|
Product: | cnd | Reporter: | Egor Ushakov <gorrus> |
Component: | Editor | Assignee: | Alexander Simon <alexvsimon> |
Status: | STARTED --- | ||
Severity: | normal | CC: | apepin, johnjullion, mmirilovic |
Priority: | P3 | Keywords: | PERFORMANCE |
Version: | 7.2 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | TASK | Exception Reporter: | |
Bug Depends on: | 229671, 229721, 229732, 218203, 218234, 218236, 218239, 218708, 218745, 218746, 218754, 218760, 218772, 218774, 218776, 218785, 218786, 218790, 218904, 218908, 218909, 220294, 221194, 221200, 225422, 225427, 225428, 225453, 229719, 229730 | ||
Bug Blocks: | |||
Attachments: | File.* access from EDT report |
Description
Egor Ushakov
2012-09-11 13:16:04 UTC
Most of these reports come from users working on NFS file system which can be very slow. Current numbers of file system requests (File.isFile, File.exists, File.isDirectory, File.isHidden) from EDT: new file open in the editor - 8-14 first symbol entered - 6 subsequent symbols entered - 1 file save - 15 opened file tab switch - 4 It may be beneficial to make a warning in the IDE log if we access file system from EDT. Candidates may be: FileObj.canWrite Utilities.toURI FileUtil.normalizePath Easiest way to track such calls is to set breakpoints in File methods (exists, isDirectory, isFile) with the condition: javax.swing.SwingUtilities.isEventDispatchThread() I suspect that excessive I/O can lead to CPU starvation. I have seen this on a system with sufficient memory where most I/O hits the disk cache. From that perspective, reducing I/O would be very rewarding. thanks to the fix of #218203 now: subsequent symbols entered - 0 there are many slowness reports in different parts of the IDE because of that, just the latest: http://statistics.netbeans.org/analytics/detail.do?id=193321 http://statistics.netbeans.org/exceptions/detail.do?id=194345 http://statistics.netbeans.org/exceptions/detail.do?id=183632 All of them share the same root cause - accessing file system from EDT. Thanks to everyone provided fixes! Here is current statistics, it is much better now (less is better): new file open in the editor 3-11 (was 8-14) first symbol entered 2-7 (was 6) subsequent symbols entered 0 (was 1) file save 0 (was 15) opened file tab switch 0 (was 4) I plan to analyze and file what's left soon. We've done the analysis and found only one place where IDE reads project files in EDT, see bug 229719 ups, there is another one: bug 229721 Created attachment 134419 [details]
File.* access from EDT report
this is umbrella task |