Skip to content

Commit 2f51baa

Browse files
committed
Precompile terminfo loading and the Banner
This improves startup latency, a neded improvement now that startup is a bit fancier.
1 parent e4147de commit 2f51baa

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

base/client.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ function repl_main(_)
590590
banner = if opts.banner == -1
591591
10 * Int(interactiveinput)
592592
else
593-
opts.banner
593+
Int(opts.banner)
594594
end
595595
quiet = (opts.quiet != 0)
596596
history_file = (opts.historyfile != 0)

stdlib/REPL/src/precompile.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,14 @@ UP_ARROW = "\e[A"
3232
DOWN_ARROW = "\e[B"
3333

3434
repl_script = """
35+
Base.load_terminfo("xterm")
3536
2+2
3637
print("")
3738
printstyled("a", "b")
3839
display([1])
3940
display([1 2; 3 4])
41+
import REPL.banner
42+
banner()
4043
foo(x) = 1
4144
@time @eval foo(1)
4245
; pwd

0 commit comments

Comments
 (0)