[jira] [Commented] (NETBEANS-1593) Debugging slows down JavaScript execution 20x times

2018-11-08 Thread Martin Entlicher (JIRA)


[ 
https://issues.apache.org/jira/browse/NETBEANS-1593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16679751#comment-16679751
 ] 

Martin Entlicher commented on NETBEANS-1593:


I've reproduced a debugger-induced performance regression on standard JDK (JDK 
8 as well as JDK 11) in memory-intensive applications. Such a performance 
regression is not observable on GraalVM.

When running with Graal compiler, pure debug, or suspend in Java code and 
resume, run almost as fast as a pure run.
Step into eval, which ends in a script causes a dramatic performance regression 
after the suspended execution in the script is resumed.
As a workaround, the new action with G-like icon called "Toggle Pause in 
GraalVM Script" can be used as a faster version of step into user script and 
this action does not have the ugly side-effect of the dramatic performance 
regression.
 

> Debugging slows down JavaScript execution 20x times
> ---
>
> Key: NETBEANS-1593
> URL: https://issues.apache.org/jira/browse/NETBEANS-1593
> Project: NetBeans
>  Issue Type: Bug
>  Components: debugger - Java
>Affects Versions: 10.0
>Reporter: Jaroslav Tulach
>Assignee: Martin Entlicher
>Priority: Major
>
> While working on 
> [PR-4|https://github.com/graalvm/graal-js-jdk11-maven-demo/pull/4] I realized 
> that Truffle debugger support in NetBeans slows down execution 20x times. 
> Without debugger the benchmark can execute in 150ms. With debugger it takes 
> more than 3s. At current state the great Truffle debugging feature is not 
> suitable for a demo.
> To reproduce, you need:
>  * NetBeans 10 VC2
>  * JDK11
>  * 
> [graal-js-jdk11-maven-demo|https://github.com/graalvm/graal-js-jdk11-maven-demo]
>  at revision 2f851ca6d922
> Then you can debug the {{AppTest}} unit test and put a breakpoint to calls to 
> {{eval}}, etc. Once the breakpoint is hit, remove it and continue. The rest 
> of the execution will be slow - e.g. take more than 3s for each round.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Commented] (NETBEANS-1593) Debugging slows down JavaScript execution 20x times

2018-11-08 Thread Martin Entlicher (JIRA)


[ 
https://issues.apache.org/jira/browse/NETBEANS-1593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16679890#comment-16679890
 ] 

Martin Entlicher commented on NETBEANS-1593:


Further examination revealed that the dramatic performance regression is caused 
by inactive compilation.

1. When the "Toggle Pause in GraalVM Script" is used to enter eval, then:
 * two compiler threads are started, "TruffleCompilerThread-20" and 
"TruffleCompilerThread-21",
 * 6 compilation jobs are performed

2. When the "Step into" is used to enter eval, then:
 * one compiler thread is started only, "TruffleCompilerThread-20",
 * 1 compilation job is performed

These are symptoms of something that was apparently broken by stepping through 
the initial language execution, but it's not clear yet what's that.

These are indication that this is a bug in the platform (JDK/GraalVM), not in 
NetBeans, IMHO. Further investigation is necessary.

> Debugging slows down JavaScript execution 20x times
> ---
>
> Key: NETBEANS-1593
> URL: https://issues.apache.org/jira/browse/NETBEANS-1593
> Project: NetBeans
>  Issue Type: Bug
>  Components: debugger - Java
>Affects Versions: 10.0
>Reporter: Jaroslav Tulach
>Assignee: Martin Entlicher
>Priority: Major
>
> While working on 
> [PR-4|https://github.com/graalvm/graal-js-jdk11-maven-demo/pull/4] I realized 
> that Truffle debugger support in NetBeans slows down execution 20x times. 
> Without debugger the benchmark can execute in 150ms. With debugger it takes 
> more than 3s. At current state the great Truffle debugging feature is not 
> suitable for a demo.
> To reproduce, you need:
>  * NetBeans 10 VC2
>  * JDK11
>  * 
> [graal-js-jdk11-maven-demo|https://github.com/graalvm/graal-js-jdk11-maven-demo]
>  at revision 2f851ca6d922
> Then you can debug the {{AppTest}} unit test and put a breakpoint to calls to 
> {{eval}}, etc. Once the breakpoint is hit, remove it and continue. The rest 
> of the execution will be slow - e.g. take more than 3s for each round.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Commented] (NETBEANS-1593) Debugging slows down JavaScript execution 20x times

2018-11-07 Thread Martin Entlicher (JIRA)


[ 
https://issues.apache.org/jira/browse/NETBEANS-1593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16678428#comment-16678428
 ] 

Martin Entlicher commented on NETBEANS-1593:


It looks like {{ClassPrepareRequest}} adds a big overhead. When I do not submit 
any {{ClassPrepareRequest}}, each round takes around 2s. It's strange that the 
slow execution of more than 3s persists even after all requests are removed. It 
looks like a bug of JDK 11. I'll check the behavior on JDK 8 to have a 
comparison. In any case a performance degradation caused by (not being hit) 
{{ClassPrepareRequest}} from 2s to more than 3s per iteration looks like too 
much to me.

> Debugging slows down JavaScript execution 20x times
> ---
>
> Key: NETBEANS-1593
> URL: https://issues.apache.org/jira/browse/NETBEANS-1593
> Project: NetBeans
>  Issue Type: Bug
>  Components: debugger - Java
>Affects Versions: 10.0
>Reporter: Jaroslav Tulach
>Assignee: Martin Entlicher
>Priority: Major
>
> While working on 
> [PR-4|https://github.com/graalvm/graal-js-jdk11-maven-demo/pull/4] I realized 
> that Truffle debugger support in NetBeans slows down execution 20x times. 
> Without debugger the benchmark can execute in 150ms. With debugger it takes 
> more than 3s. At current state the great Truffle debugging feature is not 
> suitable for a demo.
> To reproduce, you need:
>  * NetBeans 10 VC2
>  * JDK11
>  * 
> [graal-js-jdk11-maven-demo|https://github.com/graalvm/graal-js-jdk11-maven-demo]
>  at revision 2f851ca6d922
> Then you can debug the {{AppTest}} unit test and put a breakpoint to calls to 
> {{eval}}, etc. Once the breakpoint is hit, remove it and continue. The rest 
> of the execution will be slow - e.g. take more than 3s for each round.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists