Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #39059

Re: Starting jshell takes about 15 seconds

From Arne Vajhøj <arne@vajhoej.dk>
Newsgroups comp.lang.java.programmer
Subject Re: Starting jshell takes about 15 seconds
Date 2019-08-01 21:05 -0400
Organization Aioe.org NNTP Server
Message-ID <qi029j$1v5c$2@gioia.aioe.org> (permalink)
References <87tvb6no0u.fsf@munus.decebal.nl> <qhlcna$91c$1@gioia.aioe.org> <slrnqjt9uk.36g.avl@logic.at> <87pnlsof1z.fsf@munus.decebal.nl>

Show all headers | View raw


On 7/29/2019 2:45 PM, Cecil Westerhof wrote:
> My startup is expensive. When doing it like that I get a real around 9
> seconds, but when I use:
>      time jshell --no-startup <<< /exit
> 
> real is between 1.5 and 2 seconds.
> 
> I only do:
>      import java.text.DateFormat;
>      import java.text.SimpleDateFormat;
> 
> 
>      DateFormat dateTimeFormat = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss");
> 
> 
>      String currentDateTime() {
>          return dateTimeFormat.format(new Date());
>      }
> 
> 
>      println(currentDateTime());
> 
> But it seems it is quit expensive. :'-(

That code may do more than first meet the eye.

It needs time, timezone, locale etc..

Arne

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Starting jshell takes about 15 seconds Cecil Westerhof <Cecil@decebal.nl> - 2019-07-28 18:04 +0200
  Re: Starting jshell takes about 15 seconds Arne Vajhøj <arne@vajhoej.dk> - 2019-07-28 19:56 -0400
    Re: Starting jshell takes about 15 seconds Andreas Leitgeb <avl@logic.at> - 2019-07-29 08:01 +0000
      Re: Starting jshell takes about 15 seconds Cecil Westerhof <Cecil@decebal.nl> - 2019-07-29 20:45 +0200
        Re: Starting jshell takes about 15 seconds Cecil Westerhof <Cecil@decebal.nl> - 2019-07-29 21:10 +0200
        Re: Starting jshell takes about 15 seconds Arne Vajhøj <arne@vajhoej.dk> - 2019-08-01 21:05 -0400
      Re: Starting jshell takes about 15 seconds Arne Vajhøj <arne@vajhoej.dk> - 2019-08-01 21:03 -0400

csiph-web