Skip to content

Commit

Permalink
Precompile terminfo loading and the Banner
Browse files Browse the repository at this point in the history
This improves startup latency, a neded improvement now that startup is a
bit fancier.
  • Loading branch information
tecosaur committed Oct 22, 2023
1 parent e4147de commit 2f51baa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion base/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ function repl_main(_)
banner = if opts.banner == -1
10 * Int(interactiveinput)
else
opts.banner
Int(opts.banner)
end
quiet = (opts.quiet != 0)
history_file = (opts.historyfile != 0)
Expand Down
3 changes: 3 additions & 0 deletions stdlib/REPL/src/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ UP_ARROW = "\e[A"
DOWN_ARROW = "\e[B"

repl_script = """
Base.load_terminfo("xterm")
2+2
print("")
printstyled("a", "b")
display([1])
display([1 2; 3 4])
import REPL.banner
banner()
foo(x) = 1
@time @eval foo(1)
; pwd
Expand Down

0 comments on commit 2f51baa

Please sign in to comment.