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 166408 - RecentProjects action's presenter takes >3s
Summary: RecentProjects action's presenter takes >3s
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Projects UI (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Milan Kubec
URL:
Keywords: PERFORMANCE
: 169094 169416 169505 169715 171088 172468 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-06-02 15:01 UTC by Jaroslav Tulach
Modified: 2009-09-18 22:49 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Profiler snapshot (16.82 KB, application/octet-stream)
2009-06-02 15:02 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-06-02 15:01:47 UTC
Sometimes, especially when disk caches are slow, creating presenter for "Open Recent Project" can be quite slow. Looks 
like it is enough to invoke popup menu on Project tab (e.g. without even trying to expand the list of recent 
projects).
Comment 1 Jaroslav Tulach 2009-06-02 15:02:36 UTC
Created attachment 83105 [details]
Profiler snapshot
Comment 2 Milan Kubec 2009-06-05 10:08:03 UTC
Because of the word "sometimes" and due to the fact that I'm not able to reproduce any delay at all even when the menu
if full and even on VBoxed machine I'm lowering priority to P3.
Comment 3 Milan Kubec 2009-09-07 11:45:31 UTC
Fixed.

http://hg.netbeans.org/cdev/rev/e9594a65a4c9
Comment 4 Milan Kubec 2009-09-07 13:16:24 UTC
*** Issue 169416 has been marked as a duplicate of this issue. ***
Comment 5 Milan Kubec 2009-09-07 13:26:37 UTC
*** Issue 169505 has been marked as a duplicate of this issue. ***
Comment 6 Milan Kubec 2009-09-07 14:20:51 UTC
*** Issue 171088 has been marked as a duplicate of this issue. ***
Comment 7 Milan Kubec 2009-09-07 14:48:52 UTC
*** Issue 169715 has been marked as a duplicate of this issue. ***
Comment 8 Quality Engineering 2009-09-08 02:48:01 UTC
Integrated into 'main-golden', will be available in build *200909071948* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/e9594a65a4c9
User: Milan Kubec <mkubec@netbeans.org>
Log: #166408: filling recent projects submenu out off AWT EQ
Comment 9 Jaroslav Tulach 2009-09-08 07:12:07 UTC
Are you sure you want to use RequestProcessor.getDefault()? Tasks posted into RP.gD() run in parallel. Is that your 
intended behaviour? If so, close and sorry for re-opening.

Are you also sure that for each project (and its JMenuItem) you want to call own SwingUtilities.invokeLater? Would it 
not be cleaner to prepare all JMenuItems and only then switch to AWT thread? If the current behaviour is intended then 
sorry for re-opening.

Btw. do you know it is possible to reuse the same Runnable for RP.gD() and SU.iL()? Just first statement in the run() 
method needs to be if (SwingUtilities.isEventDispatchThread()) { /* do the AWT part */ } else { /* initialize */; 
SwingUtilities.invokeLater(this); }
Comment 10 Milan Kubec 2009-09-08 09:06:41 UTC
Better fix.

http://hg.netbeans.org/cdev/rev/ca6b11107f5d
Comment 11 Jaroslav Tulach 2009-09-08 12:10:27 UTC
OK, thanks.
Comment 12 Milan Kubec 2009-09-10 10:53:53 UTC
Had to be rollbacked, see issue #171861 for details.

http://hg.netbeans.org/core-main/rev/2cbedcc89760
Comment 13 Tomas Pavek 2009-09-11 13:12:56 UTC
*** Issue 169094 has been marked as a duplicate of this issue. ***
Comment 14 Quality Engineering 2009-09-11 21:47:20 UTC
Integrated into 'main-golden', will be available in build *200909111401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/2cbedcc89760
User: Milan Kubec <mkubec@netbeans.org>
Log: #171861: rollback of fix for issue #166408, filling submenu asynchronously is not that easy
Comment 15 Milan Kubec 2009-09-14 12:46:10 UTC
Different sort of fix: we won't call refresh.

http://hg.netbeans.org/core-main/rev/31c42d425c99
Comment 16 Jaroslav Tulach 2009-09-14 15:16:49 UTC
Should not you warn the user when he tries to open no longer existing project with some dialog? Otherwise OK from 
performance point of view.
Comment 17 Milan Kubec 2009-09-14 15:25:49 UTC
There already is code that does it in RecentProjects.java. But IDE refresh was usually faster than me when I tested the
fix, so I actually haven't a chance to click on the non existing project.
Comment 18 Milan Kubec 2009-09-17 12:59:06 UTC
*** Issue 172468 has been marked as a duplicate of this issue. ***
Comment 19 Quality Engineering 2009-09-18 22:49:29 UTC
Integrated into 'main-golden', will be available in build *200909181401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/31c42d425c99
User: Milan Kubec <mkubec@netbeans.org>
Log: #166408: avoiding refresh when returning recent projects