-
Enhancement
-
Resolution: Fixed
-
P4
-
8u40
-
b29
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085697 | emb-9 | Attila Szegedi | P4 | Resolved | Fixed | team |
JDK-8064202 | 8u45 | Attila Szegedi | P4 | Resolved | Fixed | b01 |
JDK-8056162 | 8u40 | Attila Szegedi | P4 | Resolved | Fixed | b04 |
JDK-8070439 | emb-8u47 | Attila Szegedi | P4 | Resolved | Fixed | team |
Profiling a simple scenario:
$ ~/Install/jdk9u20/bin/java -jar dist/nashorn.jar -Dnashorn.typeInfo.disabled=false --class-cache-size=0 --persistent-code-cache=false -scripting --log=time test/script/basic/compile-octane.js -- --iterations 5
...yields a few simple low-hanging fruits, here is one of them. Out of 220 seconds of run, ~5 seconds are spent here:
6.160 jdk.nashorn.internal.parser.Parser.parse()
6.160 jdk.nashorn.internal.parser.Parser.parse(java.lang.String, int, int, boolean)
4.830 jdk.nashorn.internal.parser.Lexer.<init>(jdk.nashorn.internal.runtime.Source, int, int, jdk.nashorn.internal.parser.TokenStream, boolean)
4.830 jdk.nashorn.internal.runtime.Source.getContent()
4.820 java.lang.Object.clone()
Sundar tells me that defensive copy is needed to shut FindBugs up, which means we could gain the performance back by sharing the original char[] via getContent()
$ ~/Install/jdk9u20/bin/java -jar dist/nashorn.jar -Dnashorn.typeInfo.disabled=false --class-cache-size=0 --persistent-code-cache=false -scripting --log=time test/script/basic/compile-octane.js -- --iterations 5
...yields a few simple low-hanging fruits, here is one of them. Out of 220 seconds of run, ~5 seconds are spent here:
6.160 jdk.nashorn.internal.parser.Parser.parse()
6.160 jdk.nashorn.internal.parser.Parser.parse(java.lang.String, int, int, boolean)
4.830 jdk.nashorn.internal.parser.Lexer.<init>(jdk.nashorn.internal.runtime.Source, int, int, jdk.nashorn.internal.parser.TokenStream, boolean)
4.830 jdk.nashorn.internal.runtime.Source.getContent()
4.820 java.lang.Object.clone()
Sundar tells me that defensive copy is needed to shut FindBugs up, which means we could gain the performance back by sharing the original char[] via getContent()
- backported by
-
JDK-8056162 jdk.nashorn.internal.runtime.Source.getContent() does excess Object.clone()
-
- Resolved
-
-
JDK-8064202 jdk.nashorn.internal.runtime.Source.getContent() does excess Object.clone()
-
- Resolved
-
-
JDK-8070439 jdk.nashorn.internal.runtime.Source.getContent() does excess Object.clone()
-
- Resolved
-
-
JDK-8085697 jdk.nashorn.internal.runtime.Source.getContent() does excess Object.clone()
-
- Resolved
-