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 159659 - RecentFilesAction may take ages to create its popup
Summary: RecentFilesAction may take ages to create its popup
Status: RESOLVED DUPLICATE of bug 166903
Alias: None
Product: utilities
Classification: Unclassified
Component: Open File (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Andrey Yamkovoy
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 144426
  Show dependency tree
 
Reported: 2009-03-05 09:24 UTC by Jaroslav Tulach
Modified: 2009-07-09 21:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proof (49.25 KB, image/png)
2009-03-05 09:24 UTC, Jaroslav Tulach
Details
Whole profiler snapshot (92.22 KB, application/octet-stream)
2009-03-05 09:25 UTC, Jaroslav Tulach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2009-03-05 09:24:02 UTC
After start of the IDE the RecentFileAction seems to block AWT for more than 2s while creating its menu presenter. 
Please rewrite to do this initialization asynchronously.
Comment 1 Jaroslav Tulach 2009-03-05 09:24:55 UTC
Created attachment 77752 [details]
proof
Comment 2 Jaroslav Tulach 2009-03-05 09:25:41 UTC
Created attachment 77754 [details]
Whole profiler snapshot
Comment 3 Andrey Yamkovoy 2009-03-12 09:09:53 UTC
I checked this on my local trunk build and creating menu presenters took about 150ms the very first time and about
0-15ms the others. So I will check this on the full build.

If you have some hints how to reproduce it with such a time (2-3 sec) please let me know ...
Comment 4 Jaroslav Tulach 2009-03-12 09:45:36 UTC
I guess you need to simulate cold startup. On my linux I do it with:
echo 3 > /proc/sys/vm/drop_caches
and of course, you need to have fill recent files history.
Comment 5 Alexei Mokeev 2009-03-20 10:20:04 UTC
Tested this under Ubuntu 8.04/1.8 Ghz Duo with cold startup in 2 ways:

1. echo 3 > /proc/sys/vm/drop_caches
2. Pure hard restart of a system

In both times recent files(of 8 items) opened like a charm w/o notable delay.

From profiler picture I could guess that actual delay could be if some of recent files are located on a remote drive,
e.g USB stick or on NFS: The actual time is spent in java.io.UnixFileSystem.getBooleanAttributes 

No doubt that RecentFileAction could be improved to deal with such cases, but it's definitely not a P2 from a end user
prospective.
Comment 6 Jesse Glick 2009-07-09 21:18:42 UTC

*** This issue has been marked as a duplicate of 166903 ***