Performance / JShell lightweight
Christian Stein
sormuras at gmail.com
Tue Aug 15 18:48:48 UTC 2017
On Tue, Aug 15, 2017 at 8:34 PM, Robert Scholte <rfscholte at apache.org>
wrote:
> So yes, I end my script with /exit
>
> When I run "jshell --execution local myscript.jsh" the script is just a
> startup script, the shell is still initialized, even though I end my script
> with /exit
>
> Only because of the relatively long time to execute this script I am
> looking for a faster solution.
> One thing that comes to my mind is something like "jshell --execution
> batch myscript.jsh", which will never enter the shell, but simply executes
> the script and stops.
> This assumes that the initialization of the shell itself is also part of
> the time penalty.
>
>
Interesting idea, indeed. Could need this for "forax/pro" and
"sormuras/bach" too.
But I guess, that falls into the same "hack" category as the missing
"shebang"
support. See this comment by Brian Goetz:
"More generally, "hacks" like this always come back to bite you. What you
want is a "no main, no compile java runner". Jshell looks like that, but
it isn't.
When you have nothing, a little of something seems like a really good idea;
but the warts will become apparent almost immediately. I'd much rather do
nothing for this now, and consider doing something better in the future,
than
doing something bad now -- which is what this would be."
http://mail.openjdk.java.net/pipermail/kulla-dev/2016-October/001689.html
More information about the kulla-dev
mailing list