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 233869

Summary: org.netbeans.modules.glassfish.javaee.Hk2JavaEEPlatformFactory.getJ2eePlatformImpl: LowPerformance took 8596 ms.
Product: serverplugins Reporter: Exceptions Reporter <exceptions_reporter>
Component: GlassFishAssignee: Petr Hejl <phejl>
Status: RESOLVED FIXED    
Severity: normal CC: anoopn03, aosamai, bonnymwas, johnjullion, jucsantana, jyeary, leogtzr, MWE, myururdurmaz, nebrass, NishantGoswami, phejl
Priority: P3 Keywords: PERFORMANCE
Version: 7.4   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 189826
Attachments: nps snapshot

Description Exceptions Reporter 2013-08-02 19:47:15 UTC
Build: NetBeans IDE 7.4 Beta (Build 201307092200)
VM: Java HotSpot(TM) Client VM, 23.25-b01, Java(TM) SE Runtime Environment, 1.7.0_25-b16
OS: Windows 7

User Comments:
leogtzr: Using the tag <jsp:scriptlet>, in general it's slow with scriptlets.

GUEST: was just running a simple Hello World example

johnjullion: enabling java ee

GUEST: .

jyeary: Startup and creating a new project.



Maximum slowness yet reported was 17161 ms, average is 10044
Comment 1 Exceptions Reporter 2013-08-02 19:47:17 UTC
Created attachment 138211 [details]
nps snapshot
Comment 2 TomasKraus 2013-08-03 23:45:48 UTC
Adding Petr Hejl to have a look at this too.

In GF plugin there is instance provider being initialized and it's reading configuration from disk. Slow piece of code is retrieving some class path information for maven:

org.glassfish.tools.ide.server.config.ConfigUtils#processClassPath

This can be removed from library initialization code and it can be done as lazy initialization with first maven dependencies request.

It will save approx. 1/2 of time. Another part is server instances loading (18% of time) but I would like to keep it there.

Pater, do you have an idea if this can be started as asynchronous task in infrastructure?
Comment 3 Petr Hejl 2013-08-05 06:27:20 UTC
I do see readInstanceFromFile is calling writeInstanceToFile (which takes time). Does it make sense? 

As I suggested in some other issue in case you don't need OptionalDeploymentManagerFactory.finishServerInitialization use the Proxy (learn by example in other server plugins).
Comment 4 TomasKraus 2013-08-05 15:10:14 UTC
That sounds bit weird to me but yes, you are right. This should be fixed. But it's 1/10 of total AWT queue delay. I'll have a look at proxy after all P2s will be handled.
Comment 5 Petr Hejl 2015-05-13 13:29:01 UTC
*** Bug 241207 has been marked as a duplicate of this bug. ***
Comment 6 Petr Hejl 2015-05-13 14:52:20 UTC
This should postpone the initialization of libraries to a time when it is really needed - web-main caf64576a7f1.
Comment 7 Quality Engineering 2015-05-14 03:07:31 UTC
Integrated into 'main-silver', will be available in build *201505140001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/caf64576a7f1
User: Petr Hejl <phejl@netbeans.org>
Log: #233869 - org.netbeans.modules.glassfish.javaee.Hk2JavaEEPlatformFactory.getJ2eePlatformImpl: LowPerformance took 8596 ms.