Skip to content

Incredibly Slow Dictionary Lookup when Debugging #192

Closed
@mattcbro

Description

@mattcbro

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

pfitzseb commented on Jun 11, 2019

@pfitzseb
Member

This isn't related to the dictionary lookup, you're just running into the inherently quadratic runtime of adding two arrays:

julia> @time @interpret rand(30,40) + rand(30,40)
  1.287965 seconds (3.45 M allocations: 142.426 MiB, 4.74% gc time)

julia> @time @interpret rand(300,400) + rand(300,400)
 35.905406 seconds (227.50 M allocations: 8.209 GiB, 4.43% gc time)
mattcbro

mattcbro commented on Jun 11, 2019

@mattcbro
Author

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

KristofferC commented on Jun 11, 2019

@KristofferC
Member
KristofferC

KristofferC commented on Jun 11, 2019

@KristofferC
Member

Closing this since it isn't really actionable from this repo.

mattcbro

mattcbro commented on Jun 11, 2019

@mattcbro
Author

Which repo should this be filed in then? It does make debugging impossible for most of my code.

KristofferC

KristofferC commented on Jun 11, 2019

@KristofferC
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @KristofferC@mattcbro@pfitzseb

        Issue actions

          Incredibly Slow Dictionary Lookup when Debugging · Issue #192 · JuliaDebug/Debugger.jl