Skip to content

table.show_in_notebook hangs for modestly sized table (~4500 rows) #11836

Closed

Description

@tomr-stargazer

Description

I attempted to view an astropy table using the show_in_notebook() feature, but it caused my Jupyter notebook to hang/crash, instead. I don't know what's causing the task to crash; I would not normally expect a ~4500-row table to exceed memory limits for something like this, but perhaps it is too large of a table for this feature? (If so, I'd expect a warning or exception, rather than the browser locking up.)

I investigated a little further, and found that I can explore the performance more carefully by doing table[0:100].show_in_browser(), and gradually increasing the number of rows included. On my system, for this file, show_in_notebook() has the following performance for the following table subset lengths (timings estimated using phone stopwatch app):

  1. 200 rows: below ~1s
  2. 300 rows: ~2s
  3. 400 rows: ~3s
  4. 500 rows: ~4s
  5. 750 rows: ~11s
  6. 1000 rows: ~25s
  7. 1500 rows: 1m15s
  8. 2000 rows: 2m18s

I don't have the patience to go further, but the trend is clearly superlinear and gets really sluggish to the point of uselesness beyond 500-1000 rows.

The following two tables from the literature (Robberto et al. 2020, for those curious) each cause this crash for me:

Gists for Tables 2 and 4
Table downloads: Table 2 | Table 4

Expected behavior

I expected that the table would be shown using the show_in_notebook viewer.

Actual behavior

The tab crashed/hanged, and I waited for several minutes - nothing changed, I got a "loading wheel", and my other Jupyter tabs also hanged.

Steps to Reproduce

  1. Load the table using a step like this: robb_table2 = astropy.table.Table.read(filepath_table2, format='ascii')
  2. View the table using robb_table2.show_in_notebook()
  3. The tab hangs.
# Put your Python code snippet here.

System Details

Darwin-19.6.0-x86_64-i386-64bit
Python 3.7.7 (default, Mar 26 2020, 10:32:53)
[Clang 4.0.1 (tags/RELEASE_401/final)]
Numpy 1.20.2
astropy 4.2.1
Scipy 1.6.2
Matplotlib 3.3.4

I'm on Mac OS X 10.15.7 Catalina, and Firefox 89.0, if that matters.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions