1.10 alpha significantly slower to start REPL

Got the new alpha from juliaup, and the REPL seemed significantly slower to boot than in the release.

Did a very simple test where I pressed Ctrl-D as soon as I saw the julia prompt, so might be a little variability from that but hardly 2 seconds.

❯ time julia +alpha
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.10.0-alpha1 (2023-07-06)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia>

________________________________________________________
Executed in    5.30 secs    fish           external
   usr time    5.00 secs    0.00 millis    5.00 secs
   sys time    0.76 secs    1.00 millis    0.76 secs


❯ time julia +release
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.9.2 (2023-07-05)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia>

________________________________________________________
Executed in    3.27 secs    fish           external
   usr time    2.92 secs  427.00 micros    2.92 secs
   sys time    0.57 secs  106.00 micros    0.57 secs

Can’t confirm on my machine (Apple M1 Mac):

➜  ~
$ time julia +release -e 'nothing'
julia +release -e 'nothing'  0.18s user 0.06s system 131% cpu 0.179 total

➜  ~
$ time julia +alpha -e 'nothing'
julia +alpha -e 'nothing'  0.18s user 0.06s system 128% cpu 0.185 total

➜  ~
$ time julia +release
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.9.2 (2023-07-05)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia>
julia +release  1.04s user 0.12s system 176% cpu 0.658 total

➜  ~
$ time julia +alpha
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.10.0-alpha1 (2023-07-06)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia>
julia +alpha  1.04s user 0.08s system 156% cpu 0.714 total

Okay, that is nice. Hope it is just something on my setup then.

I also tried the -e "nothing" at first, though for me that was faster for alpha. So it seemed like it was something specifically tied to the REPL that added like 50% more time :confused:

It’s very quick for me:

> time julia +alpha --startup-file=no

real	0m0,375s
user	0m0,435s
sys	0m0,673s

Do you have something expensive in your startup file?

3 Likes

Thanks, feel a bit stupid now :sweat_smile:

Without startup it is pretty instant, and after commenting out some things in it I found that AbbreviatedStackTraces.jl seems to be the one causing most of the delay in both versions and specifically the noticable difference in delay.

Will probably leave it out based on this, though I do like the package so it feels a bit sad.

2 Likes

Julia 1.10 does have limited stack traces: (#49795, #49959)
It’s not to the extent that AbbreviatedStackTraces has it, but it’s something.

7 Likes

Also note that you’re testing an alpha version of Julia 1.10 that literally just came out. Most packages haven’t had time to adapt to changes yet. Maybe there’s something that AbbreviatedStackTraces.jl can do to improve for 1.10. A little patience could be enough :slight_smile:

4 Likes

The main thing AbbreviatedStatckTraces.jl should probably do is check if the version is 1.10 or higher and if so disable itself :slight_smile:

1 Like

That sounds strange since a large point of AbbreviatedStatckTraces is to hide stack frames that are deemed uninteresting and that part has not been changed in Julia itself.

6 Likes

Sadly, AbbreviatedStackTraces has to reach deep into Julia to overwrite key REPL functions, resulting in a lot of recompilation.

I’ll need to harmonize it with 1.10 so that it’s not bypassing whatever changes were made to stack traces there. But probably won’t change the performance.

And Kristoffer is correct, it goes further than what’s in 1.10 so I’m not done with this package :slight_smile:

10 Likes