Open pocke opened 3 years ago
This PR makes loading IRB lazy. It improves startup time.
Byebug always loads IRB, but IRB is necessary only for irb command. It makes startup time slower unnecessarily for non-IRB users.
irb
Let's load IRB lazily.
About 55ms (50%) faster.
$ RUBYLIB=lib ruby -rbenchmark -e 'p Benchmark.realtime{require "byebug/core"};' 0.11415267689153552
$ RUBYLIB=lib ruby -rbenchmark -e 'p Benchmark.realtime{require "byebug/core"};' 0.059115791926160455
This PR makes loading IRB lazy. It improves startup time.
Problem
Byebug always loads IRB, but IRB is necessary only for
irb
command. It makes startup time slower unnecessarily for non-IRB users.Solution
Let's load IRB lazily.
Benchmark
About 55ms (50%) faster.
before
after