Closed
Description
If there is a large enough array inside a dictionary it appears to slow the debugger to a crawl. Actually this example never really finishes in any sort of reasonable time when stepping through the debugger. This code uses the Juno interface, but I believe the debugger interface has the same problem.
This is happening under Julia 1.1.1 .
""" extract the raw data from dictionary """
function valdata(val)
# next statement takes an infinite amount of time to step through
xraw = val["rdat"] + 1.0im .* val["idat"]
return(xraw)
end
ar = randn(3000,4000)
ai = randn(3000,4000)
vdat = Dict()
vdat["rdat"] = ar
vdat["idat"] = ai
vdat["num"] = pi
vdat["text"] = " This is text"
xcomp = Juno.@enter valdata(vdat)
Activity
pfitzseb commentedon Jun 11, 2019
This isn't related to the dictionary lookup, you're just running into the inherently quadratic runtime of adding two arrays:
mattcbro commentedon Jun 11, 2019
It's quadratic only in one of the dimensions of the 2D array I suppose. However the bigger question is why the heck is the debugger so slow adding 2 arrays when Julia itself does the same almost instantly? Can't one compile a line of code and then run it during debug?
KristofferC commentedon Jun 11, 2019
See JuliaDebug/JuliaInterpreter.jl#206 and JuliaDebug/JuliaInterpreter.jl#204 for performance discussion.
KristofferC commentedon Jun 11, 2019
Closing this since it isn't really actionable from this repo.
mattcbro commentedon Jun 11, 2019
Which repo should this be filed in then? It does make debugging impossible for most of my code.
KristofferC commentedon Jun 11, 2019
https://github.com/JuliaDebug/JuliaInterpreter.jl but unless there is some new information here, it might get closed as a dup of one of the other performance issues.