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] Editor not responding for large for loop #318

Closed
Kevin-Mattheus-Moerman opened this issue Jun 24, 2019 · 5 comments
Closed

[BUG] Editor not responding for large for loop #318

Kevin-Mattheus-Moerman opened this issue Jun 24, 2019 · 5 comments
Labels

Comments

@Kevin-Mattheus-Moerman
Copy link

Kevin-Mattheus-Moerman commented Jun 24, 2019

Details

  • Atom version: 1.38.2
  • Julia version: 1.1.1
  • OS: Ubuntu 19.04
  • Package versions:
    • Atom.jl: 0.8.5
    • julia-client: 0.8.9
    • ink: 0.10.10

Steps to reproduce

  1. Run script below
using LightXML
using Printf

A=randn(25000,3)

xdoc = XMLDocument()

# create & attach a root node
xroot = create_root(xdoc, "Nodes")

for i=1:size(A,1)
    # Create string
    s="" # empty string
    for j=1:size(A,2)
        s*=@sprintf("%.8E, ",A[i,j])
    end

    # create the first child
    xs1 = new_child(xroot, "Node")
    set_attribute(xs1, "id", @sprintf("%i",i))
    # add the inner content
    add_text(xs1, s[1:end-2])

end

If I run the above I keep getting a "Editor not responding" error. Am I doing something wrong or is this a bug?

Screenshot from 2019-06-24 22-02-31

@pfitzseb
Copy link
Member

pfitzseb commented Jun 25, 2019

I can't repro this issue, but I think the issue is that xroot's and xdoc's DOM representation are too big or something like that.
Will take a look at fixing that...

@Kevin-Mattheus-Moerman
Copy link
Author

Kevin-Mattheus-Moerman commented Jun 25, 2019

@pfitzseb thanks for checking this out.

Have you tried using A=randn(250000,3) or an even larger array?

Is "xroot's and xdoc's DOM representation" a Julia thing or a LightXML thing? (I'm wondering if I should raise the issue with LightXML).

@pfitzseb
Copy link
Member

It's a Juno thing, so you are in the right place :) And yes, bigger arrays will probably crash the editor for me as well.
As a short term workaround you can just close the workspace and take care to never display xroot's or xdoc's content in the editor ever.

@Kevin-Mattheus-Moerman
Copy link
Author

Thanks I tried it and it works. 🎉

@pfitzseb
Copy link
Member

pfitzseb commented Aug 7, 2019

Fixed with JunoLab/Atom.jl@445e3c9, afaict.

@pfitzseb pfitzseb closed this as completed Aug 7, 2019
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