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

webpage crashes with large mo.ui.table page_size #3407

Open
Light2Dark opened this issue Jan 13, 2025 · 2 comments
Open

webpage crashes with large mo.ui.table page_size #3407

Light2Dark opened this issue Jan 13, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@Light2Dark
Copy link
Contributor

Describe the bug

When I use mo.ui.table with a large page_size config, the browser will crash. The only solution is to restart marimo. At least some fallback / error message / hardcode the limit is preferable

Environment

{
  "marimo": "0.10.12",
  "OS": "Darwin",
  "OS Version": "23.6.0",
  "Processor": "arm",
  "Python Version": "3.13.1",
  "Binaries": {
    "Browser": "131.0.6778.265",
    "Node": "v23.2.0"
  },
  "Dependencies": {
    "click": "8.1.8",
    "docutils": "0.21.2",
    "itsdangerous": "2.2.0",
    "jedi": "0.19.2",
    "markdown": "3.7",
    "narwhals": "1.21.1",
    "packaging": "24.2",
    "psutil": "6.1.1",
    "pygments": "2.19.1",
    "pymdown-extensions": "10.14",
    "pyyaml": "6.0.2",
    "ruff": "0.9.1",
    "starlette": "0.45.2",
    "tomlkit": "0.13.2",
    "typing-extensions": "4.12.2",
    "uvicorn": "0.34.0",
    "websockets": "14.1"
  },
  "Optional Dependencies": {
    "anywidget": "0.9.13",
    "duckdb": "1.1.3",
    "polars": "1.18.0",
    "pyarrow": "18.1.0"
  }
}

Code to reproduce

@app.cell
def _(mo):
    random = mo.sql(
        f"""
        SELECT 
            1, 2, 3, 4, 5
        FROM generate_series(1,10000)
        """
    )
    return (random,)


@app.cell
def _(mo, random):
    mo.ui.table(random, page_size=10000)
    return
@Light2Dark Light2Dark added the bug Something isn't working label Jan 13, 2025
@mscolnick
Copy link
Contributor

My guess is from rendering react. We could add row virtualization (example) when rows are e.g. > 500

@akshayka
Copy link
Contributor

In the meantime I am totally okay with raising a ValueError in Python when the page size is too big (eg, greater than 200)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants