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 234182 - First popup invocation on PHP file slower than in 7.3.1
Summary: First popup invocation on PHP file slower than in 7.3.1
Status: REOPENED
Alias: None
Product: php
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2013-08-09 12:46 UTC by Jiri Skrivanek
Modified: 2013-09-03 10:46 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
snapshot for 7.3.1 (40.64 KB, application/octet-stream)
2013-08-14 12:43 UTC, Tomas Mysik
Details
snapshot for 7.4 dev (59.94 KB, application/octet-stream)
2013-08-14 12:44 UTC, Tomas Mysik
Details
screenshot of snapshot comparison (329.97 KB, image/png)
2013-08-14 12:44 UTC, Tomas Mysik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2013-08-09 12:46:59 UTC
Popup on PHP file appears significantly slower than in NetBeans 7.3.1. Test case is the following (ignore failures in GlassFish setup):

ant -f performance
ant -f performance/languages test -Dtest.includes=**/ScriptingNodePopupTest.class

#####  Results for test_PHP_NodePopup   #####
#####        [953ms, 17ms, 16ms, 15ms, ]
#############################################

7.3.1 results:

#####  Results for test_PHP_NodePopup   #####
#####        [326ms, 15ms, 15ms, 13ms, ]
#############################################

Product Version: NetBeans IDE Dev (Build web-main-11294-on-20130808)
Java: 1.7.0_40-ea; Java HotSpot(TM) 64-Bit Server VM 24.0-b55
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-ea-b37
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
Comment 1 Tomas Mysik 2013-08-14 06:56:07 UTC
I will look at it. Jirko, would it be possible to have a profiler snapshot for it? Just to be sure...

Thanks.
Comment 2 Tomas Mysik 2013-08-14 09:57:53 UTC
So, I started IDE and right clicked on a random PHP file in a PHP project - please correct me if these steps are wrong (the performance test itself fails for me with [1]).

Unfortunately, I need a profiler snapshot since I cannot find any problem (also, the relevant code did not change for a long time). I created a profiler snapshot manually but everything seems to be OK to me - creating popup menu took 100 ms, the PHP part is:

org.netbeans.modules.php.project.ui.logicalview.SrcNode$ObjectNode.getActions()	2.1551027	65,9 ms (2,2%)	49,9 ms

Please reopen and attach a profiler snapshot so I can investigate it more.

Thanks.
[1] org.netbeans.jemmy.TimeoutExpiredException: Wait next node loaded under parent [Projects] when requested was [ ScriptingPerfTest ] (JTreeOperator.WaitNextNodeTimeout)

Product Version: NetBeans IDE Dev (Build 20130814-0c03b28336ec)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15
System: Linux version 3.8.0-27-generic running on amd64; UTF-8; cs_CZ (nb)
Comment 3 Tomas Mysik 2013-08-14 10:14:44 UTC
More information: I tried to reproduce it with the file from the test - PHP took:
org.netbeans.modules.php.project.PhpActionProvider.isActionEnabled()	0.35990676	10,3 ms (0,4%)	0,000 ms
org.netbeans.modules.php.project.ui.logicalview.SrcNode$ObjectNode.getActions()	1.3746396	39,7 ms (1,4%)	26,6 ms

I was "successful" only once, the problem was not in PHP but in Lookup:
org.openide.util.lookup.MetaInfServicesLookup.beforeLookup()	10.691153	368 ms (10,7%)	368 ms	1

BTW I start IDE with no file opened and with a folder selected in the Projects view (so Navigator stays empty after startup).

Thanks.
Comment 4 Tomas Mysik 2013-08-14 12:43:14 UTC
Reopening, we have compared snapshots from NB 7.3.1 and 7.4 dev. I will attach them together with a screenshot showing that the dev version is much slower than 7.3.1.

Since I am not sure where to assign this issue, passing to ide/Code. Please evaluate, thanks.
Comment 5 Tomas Mysik 2013-08-14 12:43:41 UTC
Created attachment 138684 [details]
snapshot for 7.3.1
Comment 6 Tomas Mysik 2013-08-14 12:44:06 UTC
Created attachment 138685 [details]
snapshot for 7.4 dev
Comment 7 Tomas Mysik 2013-08-14 12:44:47 UTC
Created attachment 138686 [details]
screenshot of snapshot comparison
Comment 8 Vladimir Riha 2013-08-14 12:56:57 UTC
Perhaps performance guys would know? Thank you in advance
Comment 9 Petr Cyhelsky 2013-08-30 13:10:16 UTC
It seems that the major difference is that in the 7.4 there are some menu items which are not initialized and need 
for example 

org.netbeans.modules.csl.core.GsfDataObject$EditorSupportFactory.createCookie()	

for its initialization.

The way to investigate this would be to debug
org.netbeans.modules.openide.awt.DefaultAWTBridge.createPopupPresenter()
to see which popup menu item is causing this...
Comment 10 Tomas Mysik 2013-09-02 08:01:37 UTC
Sorry, I have no idea what I should do to investigate the cause of this issue (every action in TreeView.createPopup() is slower than in 7.3.1).