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 246412 - More than 10x slowdown when using Nashorn debugger
Summary: More than 10x slowdown when using Nashorn debugger
Status: RESOLVED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 8.0
Hardware: PC Linux
: P2 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks: 244903
  Show dependency tree
 
Reported: 2014-08-12 17:37 UTC by Jaroslav Tulach
Modified: 2014-08-14 14:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Snapshot from visual vm showing what NetBeans IDE is doing during debugging (4.71 KB, patch)
2014-08-14 14:30 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2014-08-12 17:37:54 UTC
I have a test that finishes in 25s on my computer, when I execute it under debugger, it takes at least 5min to execute (I could not wait longer). To reproduce:

$ hg clone https://source.apidesign.org/hg/bck2brwsr/
$ cd bck2brwsr
$ hg up -C 335691ea9714
$ mvn install -DskipTests

Open rt/vm8 project in NetBeans. Choose InvokeDynamicTest and either Run File or Debug File. Compare the time difference.

I am running on Kubuntu 14.04 and I have following JDK:

$ java -version
java version "1.8.0_11"
Java(TM) SE Runtime Environment (build 1.8.0_11-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode)

I used most recent build of NetBeans, newer by few commits than current state on 8.0.1 release branch.
Comment 1 Jaroslav Tulach 2014-08-12 17:40:09 UTC
My version certainly contains 2c684310cc24, so I'd say bug 244903 has not been addressed.
Comment 2 Jaroslav Tulach 2014-08-14 14:30:29 UTC
Created attachment 148702 [details]
Snapshot from visual vm showing what NetBeans IDE is doing during debugging
Comment 3 Martin Entlicher 2014-08-14 14:59:02 UTC
Reproduced on JDK 1.8.0 update 11.
The problem disappears on JDK 1.8.0 update 20 build 23.

The test generates a lot of classes like Script$\^eval\_$92
When run on 1.8.0_11, it uses the old approach binding JS sources to classes and receives many ClassPrepareRequests. On Update 20 we uses a more efficient approach after the fix of issue #244903.

Please use update 20 or newer.