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 - RecentFileAction performs blocking I/O in the event thread
Summary: RecentFileAction performs blocking I/O in the event thread
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Victor Vasilyev
URL:
Keywords: PERFORMANCE, SIMPLEFIX
: 186171 (view as bug list)
Depends on:
Blocks: 65135
  Show dependency tree
 
Reported: 2009-08-05 02:17 UTC by _ tboudreau
Modified: 2010-05-27 09:51 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Patch for this issue (20.37 KB, patch)
2009-08-05 02:17 UTC, _ tboudreau
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ***