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 165978 - >3s in popup menu of non-versioned project in VCS modules
Summary: >3s in popup menu of non-versioned project in VCS modules
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@versioncontrol
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2009-05-25 16:23 UTC by Jaroslav Tulach
Modified: 2009-07-20 09:49 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Profiler snapshot (23.13 KB, application/octet-stream)
2009-05-25 16:24 UTC, Jaroslav Tulach
Details
snapshot with many projects under the same parent folder (19.07 KB, application/octet-stream)
2009-07-10 17:19 UTC, Tomas Pavek
Details
snapshot with a project that is alone (20.14 KB, application/octet-stream)
2009-07-10 17:20 UTC, Tomas Pavek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2009-05-25 16:23:58 UTC
After cold start I have to wait more than 3s to get popup menu of J2SE project (non-versioned). More than 2.5s seems 
to be consumed by versioning's DynamicDummyItem which calls to all versioning systems again.

I know this has been discussed once in the past, but maybe it is time to resurrect the issue. For example: Can't the 
DummyItem just check its cache and if nothing present show submenu Versioning. Meanwhile it could do the 2.5s 
computation and fill the cache for subsequent use?
Comment 1 Jaroslav Tulach 2009-05-25 16:24:33 UTC
Created attachment 82749 [details]
Profiler snapshot
Comment 2 Ondrej Vrabec 2009-06-08 16:03:27 UTC
Versioning has to call all versioning systems. It is up to them to return their's actions as soon as possible.
This must be fixed in every versioning system separately.
Comment 3 Ondrej Vrabec 2009-06-08 16:06:04 UTC
fix for mercurial: cdev #8c619e45b38a
fix for cvs: cdev #53a526e89768
fix for subversion: cdev #2d96cc2f4259
Comment 4 Quality Engineering 2009-06-11 08:39:14 UTC
Integrated into 'main-golden', will be available in build *200906110201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/2d96cc2f4259
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #165978 - long time in popup-menu
getStatus call during menu creation eliminated
Comment 5 Tomas Pavek 2009-07-10 17:17:24 UTC
It seems better, but I can still see quite long time on the first invocation after cold start (~2.5s). Also the snapshot
is rather similar. This is in 200907100200 build.

I've noticed the time spent in the version control part depends on where the project is located. Not sure what the cause
is, but my two sample projects (otherwise the same Java SE projects) differ in that one is placed next to a lot of other
projects in the same, the other is left alone in a subdir. In the first case the time spent in versioning is 1.9s, in
the second 0.7s.
Comment 6 Tomas Pavek 2009-07-10 17:19:13 UTC
Created attachment 84607 [details]
snapshot with many projects under the same parent folder
Comment 7 Tomas Pavek 2009-07-10 17:20:33 UTC
Created attachment 84608 [details]
snapshot with a project that is alone
Comment 8 Ondrej Vrabec 2009-07-17 16:09:44 UTC
partial fix dealing with snapshot-1247237349312-cpu-calltree.nps: cdev #359ee6b6f2c2 - ini4j init is delayed

partial fix dealing with snapshot-1247236744375-cpu-calltree.nps: cdev #0518bb9370c3 - import actions in CVS and SVN
called cache.getStatus. Cache holds file informations under their parents folder (similarly as metadata for CVS and
SVN), so in order to access information about a single project folder, the cache collects information also about all
siblings. So in case there are many of them, this may block AWT for a long time.
Fix replaces getStatus call with getCachedStatus.

I'm marking this as fixed, but eagerly await new snapshots :-).
Comment 9 Quality Engineering 2009-07-20 09:49:38 UTC
Integrated into 'main-golden', will be available in build *200907200201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/359ee6b6f2c2
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #165978 - >3s in popup menu of non-versioned project in VCS modules
ini4j initialization is delayed