Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Inline evaluation very slow with some workspace pane contents #372

Closed
yha opened this issue Sep 24, 2019 · 5 comments
Closed

[BUG] Inline evaluation very slow with some workspace pane contents #372

yha opened this issue Sep 24, 2019 · 5 comments
Labels

Comments

@yha
Copy link
Contributor

yha commented Sep 24, 2019

Details

  • Atom version: 1.40.1 x64
  • Julia version: 1.1.1
  • OS: Windows 10
  • Package versions:
    • Atom.jl: 0.10.1
    • julia-client: 0.10.1
    • ink: 0.11.0

Steps to reproduce

The smallest reproducing example I could find is still pretty complex. Step through the following with the workspace pane open:

using TestImages

n = 100    # no bug for n = 10
lighthouse = testimage("lighthouse");
frames = [lighthouse for _=1:n]
function f()
    cache = Dict()
    i -> get!(cache, i) do
        try
            frame = frames[i]
        catch e
            e
        end
    end
end

g = f()
e = g(n+1);
"foo"

The inline display of "foo" takes about a minute to show, and subsequent inline displays are equally slow.

@yha yha added the bug label Sep 24, 2019
@pfitzseb
Copy link
Member

So is frames the problem here? I can't repro this on Atom.jl master, so I think this is fixed.

@yha
Copy link
Contributor Author

yha commented Sep 24, 2019

I can reproduce here with Atom#master as well.

So is frames the problem here?

The problem disappears when frames is smaller. But it also disappears with various other changes, such as if the exception is not triggered (g(n) instead of g(n+1)), or if a different exception is returned which doesn't point into frames, or if the closure is not assigned to a variable (e=f()(n+1)) (or when the workspace pane is closed, as I mentioned).

@pfitzseb
Copy link
Member

Hm, weird. This is what it looks like for me with n = 1000:
Peek 2019-09-25 12-29

@yha
Copy link
Contributor Author

yha commented Sep 25, 2019

Here's what I see. Evaluation of "foo" takes about 40 seconds here. If I don't stop at the g=f() line, it's stuck already at the next line.

out

I've also reproduced this on another machine.

@pfitzseb
Copy link
Member

Ok, turns out this problem is very specific to Julia 1.1. Turns out that string(g) prints everything it closes over, including frames...

Fixed with JunoLab/Atom.jl@0d5ec76.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants