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 213036 - Regression in # of classes loaded on start - due to remotefs
Summary: Regression in # of classes loaded on start - due to remotefs
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Remote (show other bugs)
Version: 7.2
Hardware: PC Linux
: P2 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
: 213160 (view as bug list)
Depends on: 213104
Blocks:
  Show dependency tree
 
Reported: 2012-05-26 03:50 UTC by Jaroslav Tulach
Modified: 2012-06-09 04:35 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2012-05-26 03:50:40 UTC
Build 
http://deadlock.netbeans.org/hudson/job/ergonomics/3561/
of ergonomics reveals that while there are mostly changes in CND, there is a significant increase in the # of loaded classes during start. The classes seem to be especially remote fs related. That is indeed strange, as there is no remote fs used in the test:

    org.netbeans.modules.cnd.api.remote.PathMap
    org.netbeans.modules.cnd.api.remote.ServerList
    org.netbeans.modules.cnd.api.remote.ServerRecord
    org.netbeans.modules.cnd.makeproject.MakeProjectFileOwnerQuery$Cache
    org.netbeans.modules.cnd.remote.actions.OpenRemoteFileAction
    org.netbeans.modules.cnd.remote.actions.OpenRemoteProjectAction
    org.netbeans.modules.cnd.remote.actions.base.RemoteOpenActionBase
    org.netbeans.modules.cnd.remote.projectui.Installer
    org.netbeans.modules.cnd.remote.projectui.actions.ConnectionStatusAction
    org.netbeans.modules.cnd.remote.projectui.actions.NewRemoteProjectAction
    org.netbeans.modules.cnd.remote.projectui.toolbar.RemoteHostAction
    org.netbeans.modules.cnd.remote.projectui.toolbar.RemoteHostAction$HostCellRenderer
    org.netbeans.modules.cnd.remote.server.RemoteServerList
    org.netbeans.modules.cnd.remote.server.RemoteServerRecord
    org.netbeans.modules.cnd.remote.server.RemoteServerRecord$State
    org.netbeans.modules.cnd.remote.sync.BaseSyncFactory
    org.netbeans.modules.cnd.remote.sync.FtpSyncFactory
    org.netbeans.modules.cnd.remote.sync.FullRemoteSyncFactory
    org.netbeans.modules.cnd.remote.sync.FullRemoteSyncFactory$FullRemotePathMap
    org.netbeans.modules.cnd.remote.sync.RfsSyncFactory
    org.netbeans.modules.cnd.remote.sync.SharedSyncFactory
    org.netbeans.modules.cnd.remote.sync.ZipSyncFactory
    org.netbeans.modules.cnd.spi.remote.RemoteSyncFactory
    org.netbeans.modules.cnd.spi.remote.ServerListImplementation
    org.netbeans.modules.cnd.utils.CndPathUtilitities
Comment 1 Vladimir Voskresensky 2012-05-26 19:03:48 UTC
Jarda, thanks for notification. This is caused by new toolbar. 
Is there a way to minimize load of toolbar related classes if toolbar is in swtiched off state by default?
May be some way of annotation based registration of toolbar's name and it's default state? That would allow to instantiate classes only when toolbar is marked as ON by user.
Comment 2 Alexander Simon 2012-05-28 08:14:39 UTC
Attribute "lazy = true" of @ActionRegistration works wrong in case tool bar registration:
- Activated tool bar has wrong action tool bar presentation
Comment 3 Alexander Simon 2012-05-28 08:48:04 UTC
fix for org.netbeans.modules.cnd.remote.projectui.Installer:
http://hg.netbeans.org/cnd-main/rev/074619c4f2b6
Comment 4 Jaroslav Tulach 2012-05-28 09:05:16 UTC
I don't understand why this bug is assigned to platform/actions. Do you want me to revert CND's toolbar registration? I'll do it tomorrow, if you insist (by leaving the bug assigned to platform/actions). 

If you have a feeling there is a regression in platform/actions, explain. If you want to propose an enhancement in platform/actions, do it as separate issue and keep your bugs in CND.
Comment 5 Alexander Simon 2012-05-28 11:58:04 UTC
Jarda, CND team ask you to investigate possibility of lazy registration of tool bar actions.
There are no access to tool bar actions if remote tool bar is not activated (it is default behavior of toolbar).
Is it possible to use lazy = true" of @ActionRegistration to avoid instantiation of tool bar actions?
Now it is does not work. Tool bar actions' presentations have wrong UI.
If it is not possible, feel free to reassign issue to CND.
Comment 6 Quality Engineering 2012-05-29 05:38:58 UTC
Integrated into 'main-golden', will be available in build *201205290002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/074619c4f2b6
User: Alexander Simon <alexvsimon@netbeans.org>
Log: partly fixed Bug #213036 Regression in # of classes loaded on start - due to remotefs
- move installer to studio branding
Comment 7 Alexander Simon 2012-05-30 15:19:11 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/a32ad2403bb0

Classes:
org.netbeans.modules.cnd.remote.actions.base.RemoteOpenActionBase
org.netbeans.modules.cnd.remote.projectui.toolbar.RemoteHostAction
org.netbeans.modules.cnd.remote.projectui.actions.ConnectionStatusAction
org.netbeans.modules.cnd.remote.projectui.actions.NewRemoteProjectAction
org.netbeans.modules.cnd.remote.actions.OpenRemoteProjectAction
org.netbeans.modules.cnd.remote.actions.OpenRemoteFileAction
should be included in white list because platform does not support lazy action initialization of tool bar actions.
Comment 8 Alexander Simon 2012-05-30 15:22:08 UTC
*** Bug 213160 has been marked as a duplicate of this bug. ***
Comment 9 Quality Engineering 2012-06-01 05:26:30 UTC
Integrated into 'main-golden', will be available in build *201206010001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/81adbd051800
User: Petr Cyhelsky <cyhelsky@netbeans.org>
Log: Adding classes from #213036 to whitelist
Comment 10 Quality Engineering 2012-06-09 04:35:20 UTC
Integrated into 'main-golden', will be available in build *201206090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/a32ad2403bb0
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #213036 Regression in # of classes loaded on start - due to remotefs