Debugging extremely slow

Believe it or not, I suspect that one of Matlab’s advantages here is that all the performance-sensitive stuff is written in C and their debugger doesn’t step into it. So their debugger only lets you look at surface level logic, but the flip side is that it doesn’t really hurt performance. Conversely, the Julia debugger goes down to every single operation, and that just kills performance.

As a first cut you can try

julia> using JuliaInterpreter

julia> push!(JuliaInterpreter.compiled_modules, Base)
Set{Module} with 2 elements:
  Base.Threads
  Base

and see if it helps. (That will cause it to skip debugging for every method defined in Base.) Or, if you really want to exclude everything in Base, do

julia> using MethodAnalysis

julia> visit(Base) do item
           isa(item, Module) && push!(JuliaInterpreter.compiled_modules, item)
           true
       end

which will block every submodule of Base too. You might need to add some stdlibs too.

32 Likes