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

Browser freeze with 833kb of XML #7

Open
stuaxo opened this issue Feb 12, 2021 · 3 comments
Open

Browser freeze with 833kb of XML #7

stuaxo opened this issue Feb 12, 2021 · 3 comments

Comments

@stuaxo
Copy link

stuaxo commented Feb 12, 2021

I've got a moderately large amount of XML (833kb), and the browser just locks it up.

Unfortunately I can't share the XML.

I don't know if this is plausible in Jupyter, but would it be possible to stream the output to the browser ?

If I just print() the output everything works.
Using display(XML(my_xml)) the browser stops and eventually I get a firefox popup asking if I want to stop or wait for the page.

@stuaxo
Copy link
Author

stuaxo commented Feb 12, 2021

It's the browser end freezing, not the python end.

I put in some code to time things and it was about 0.02seconds, while Firefox waited about 5 minutes with 99% cpu.
I put in a sleep(4) it displayed about 4.02 seconds while Firefox had waited about 5 minutes with 99% cpu.

If I remove the call to display(XML(xml)) then there is no delay in Firefox.
If I display just the string of the XML display(xml) then there is no delay in Firefox.

I wonder if this is a Jupyter bug ?

@stuaxo
Copy link
Author

stuaxo commented Feb 12, 2021

I tried saving the output of XML(xml) into a string instead of displaying it, and it was basically instant.

In the next cell I ran the cell with just the string and reproduced the freeze.

@stuaxo
Copy link
Author

stuaxo commented Feb 12, 2021

Oh no, it has the same effect, just loading the notebook in the browser where it was previously rendered.

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

No branches or pull requests

1 participant