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 108120 - Delayed loading of projects
Summary: Delayed loading of projects
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Projects UI (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: PERFORMANCE
Depends on: 177675
Blocks:
  Show dependency tree
 
Reported: 2007-06-26 11:04 UTC by _ rkubacki
Modified: 2010-04-13 00:12 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
first draft that is very slow on project opening (10.29 KB, patch)
2007-06-26 14:01 UTC, _ rkubacki
Details | Diff
Patch that I wish to integrate today (65.22 KB, patch)
2008-01-07 08:33 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2007-06-26 11:04:09 UTC
To get better perception on startup it would be good to move project loading from module install phase after window
system loading. It means start the IDE with faster module installation then load window system and show it and finally
load projects.

Few notes:
- all parts of IDE that queries projects at the startup can be affected
- winsys deserialization is ugly and when top components are created they frequently access associated DataObject/Node
and look for their project to get information like file built status, sharability (inside versioning asked to annotate
TC's name) and so on. 
- WindowManagaer.invokeWhenUIReady is not the best - it is called from EDT when we want to do a lot of work and show
modal dialog with progress. Another problem is that it is hard to guarantee that we will plug as first task. Yet another
small one - main window is not painted when callbacks are executed.

I did some prototype that:
- calls OpenProjectList.open at the end of startup 
- on IDE shutdown always stores editor components to private.xml and modified winsys to skip persisting of these.

This has significant drawbacks:
- too many events from project opening (it is unusable for NB sources now)
- order of editor tabs, focused editor, cursor positions are not preserved. maybe some hacks are needed to lazily init
these editors.
Comment 1 _ rkubacki 2007-06-26 14:01:23 UTC
Created attachment 44404 [details]
first draft that is very slow on project opening
Comment 2 Jesse Glick 2007-06-26 17:29:27 UTC
Agreed this would be very desirable.

Moving editor persistence to the projectui module would not be a transparent change. For example, split editor windows
would not be restored on startup, I think. In general I believe our window system tries to persist a lot more than is
really necessary but I am not sure if others agree.
Comment 3 _ rkubacki 2007-10-30 18:08:47 UTC
Mostly performance related. Passing to Petr N.
Comment 4 Jaroslav Tulach 2007-11-22 10:42:35 UTC
lazy_projects_108120 branch created for module projects, its base is lazy_projects_108120_root

implementation similar to Radim's one is there. It just loads the projects outside from AWT thread and that is why it 
keeps main window responsive while loading.

What is needed is to create some camouflage to show list of open projects at beginning. And then of course, measure 
the speed up.
Comment 5 Petr Nejedly 2007-11-22 11:35:43 UTC
Please see also issue 116891, which touched this topic as well.
Comment 6 Jaroslav Tulach 2008-01-02 14:29:25 UTC
Let's work on getting this done for 6.1M1.
Comment 7 Jaroslav Tulach 2008-01-07 08:33:03 UTC
Created attachment 54743 [details]
Patch that I wish to integrate today
Comment 8 Jaroslav Tulach 2008-01-07 10:57:43 UTC
#108120: Opening main window first and only then executing OpenProjectHooks

IDE:-------------------------------------------------
IDE: [7.1.08 11:56] Committing started
Checking in projectui/test/unit/src/org/netbeans/modules/project/ui/ProjectsRootNodeTest.java;
/shared/data/ccvs/repository/projects/projectui/test/unit/src/org/netbeans/modules/project/ui/ProjectsRootNodeTest.java,v  
<--  ProjectsRootNodeTest.java
new revision: 1.2; previous revision: 1.1
done
Checking in projectui/test/unit/src/org/netbeans/modules/project/ui/OpenProjectsTrampolineImplTest.java;
/shared/data/ccvs/repository/projects/projectui/test/unit/src/org/netbeans/modules/project/ui/OpenProjectsTrampolineImplTest.java,v  
<--  OpenProjectsTrampolineImplTest.java
new revision: 1.8; previous revision: 1.7
done
Checking in projectui/test/unit/src/org/netbeans/modules/project/ui/ProjectUtilitiesTest.java;
/shared/data/ccvs/repository/projects/projectui/test/unit/src/org/netbeans/modules/project/ui/ProjectUtilitiesTest.java,v  
<--  ProjectUtilitiesTest.java
new revision: 1.19; previous revision: 1.18
done
Checking in projectui/test/unit/src/org/netbeans/modules/project/ui/ProjectsRootNodePreferredFromContextOpenTest.java;
/shared/data/ccvs/repository/projects/projectui/test/unit/src/org/netbeans/modules/project/ui/ProjectsRootNodePreferredFromContextOpenTest.java,v  
<--  ProjectsRootNodePreferredFromContextOpenTest.java
new revision: 1.2; previous revision: 1.1
done
Checking in projectui/test/unit/src/org/netbeans/modules/project/ui/OpenProjectListTest.java;
/shared/data/ccvs/repository/projects/projectui/test/unit/src/org/netbeans/modules/project/ui/OpenProjectListTest.java,v  
<--  OpenProjectListTest.java
new revision: 1.15; previous revision: 1.14
done
Checking in projectui/test/unit/src/org/netbeans/modules/project/ui/ProjectsRootNodePreferredOpenTest.java;
/shared/data/ccvs/repository/projects/projectui/test/unit/src/org/netbeans/modules/project/ui/ProjectsRootNodePreferredOpenTest.java,v  
<--  ProjectsRootNodePreferredOpenTest.java
new revision: 1.2; previous revision: 1.1
done
Checking in projectui/src/org/netbeans/modules/project/ui/Bundle.properties;
/shared/data/ccvs/repository/projects/projectui/src/org/netbeans/modules/project/ui/Bundle.properties,v  <--  
Bundle.properties
new revision: 1.96; previous revision: 1.95
done
Checking in projectui/src/org/netbeans/modules/project/ui/LazyProject.java;
/shared/data/ccvs/repository/projects/projectui/src/org/netbeans/modules/project/ui/LazyProject.java,v  <--  
LazyProject.java
new revision: 1.2; previous revision: 1.1
done
Checking in projectui/src/org/netbeans/modules/project/ui/ProjectsRootNode.java;
/shared/data/ccvs/repository/projects/projectui/src/org/netbeans/modules/project/ui/ProjectsRootNode.java,v  <--  
ProjectsRootNode.java
new revision: 1.52; previous revision: 1.51
done
Checking in projectui/src/org/netbeans/modules/project/ui/OpenProjectListSettings.java;
/shared/data/ccvs/repository/projects/projectui/src/org/netbeans/modules/project/ui/OpenProjectListSettings.java,v  
<--  OpenProjectListSettings.java
new revision: 1.32; previous revision: 1.31
done
Checking in projectui/src/org/netbeans/modules/project/ui/OpenProjectList.java;
/shared/data/ccvs/repository/projects/projectui/src/org/netbeans/modules/project/ui/OpenProjectList.java,v  <--  
OpenProjectList.java
new revision: 1.76; previous revision: 1.75
done
IDE: [7.1.08 11:56] Committing finished