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 169852

Summary: RecentFileAction performs blocking I/O in the event thread
Product: utilities Reporter: _ tboudreau <tboudreau>
Component: CodeAssignee: Victor Vasilyev <vvg>
Status: RESOLVED FIXED    
Severity: blocker CC: exceptions_reporter
Priority: P3 Keywords: PERFORMANCE, SIMPLEFIX
Version: 6.x   
Hardware: All   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 65135    
Attachments: Patch for this issue

Description _ tboudreau 2009-08-05 02:17:15 UTC
See issue 65135 for why this is important.

I'm attaching a patch which eliminates all I/O until the submenu is populated, and minimizes it there.  It does the
following things:
 - Use string paths, rather than URLs to store file paths - FileObject -> File -> URL involves multiple blocking I/O
operations
 - Do not check if the files really exist when determining initial enablement of RecentFilesAction
 - Add beep and status message if a file does not exist and cannot be opened

This results in the corner-case situation now possible, where all files in Recent Files have been deleted, but the
action is enabled (its popup contents will be empty).  Given that this is a rare case, and cannot result in the user
trying to actually open something that exists (there will just be no contents in the submenu), this seems worth the
performance benefit.
Comment 1 _ tboudreau 2009-08-05 02:17:37 UTC
Created attachment 85797 [details]
Patch for this issue
Comment 2 Victor Vasilyev 2009-11-09 10:22:57 UTC
Thanks for the patch. From my viewpoint all things are valuable.
But, it is needed to test the patch before applying.
Comment 3 Victor Vasilyev 2010-03-31 20:45:09 UTC
Fixed
http://hg.netbeans.org/main/rev/6b76f3608fe1
Comment 4 Victor Vasilyev 2010-05-27 09:51:07 UTC
*** Bug 186171 has been marked as a duplicate of this bug. ***