Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

chore: enable performant_table_charts for ourself (#5681)

Myles Scolnick264633f71bdd
diff --git a/marimo/_plugins/ui/_impl/table.py b/marimo/_plugins/ui/_impl/table.py
index 0e4ca6add6..d05d5a6061 100644
--- a/marimo/_plugins/ui/_impl/table.py
+++ b/marimo/_plugins/ui/_impl/table.py
@@ -843,8 +843,8 @@ class table(
)
# Get column stats if not chart-only mode
- get_stats = self._show_column_summaries != "chart"
- get_chart_data = (
+ should_get_stats = self._show_column_summaries != "chart"
+ should_get_chart_data = (
self._show_column_summaries != "stats"
and total_rows <= self._column_charts_row_limit
)
@@ -861,7 +861,7 @@ class table(
data = self._searched_manager
for column in self._manager.get_column_names():
- if get_stats:
+ if should_get_stats:
try:
statistic = self._searched_manager.get_stats(column)
stats[column] = statistic
@@ -870,7 +870,7 @@ class table(
# BaseExceptions, which shouldn't crash the kernel
LOGGER.warning("Failed to get stats for column %s", column)
- if get_chart_data and args.precompute:
+ if should_get_chart_data and args.precompute:
try:
# TODO: Could optimize further by getting all columns lazily
bins = data.get_bin_values(column, DEFAULT_NUM_BINS)
@@ -883,7 +883,7 @@ class table(
"Failed to get bin values for column %s", column
)
- if get_chart_data:
+ if should_get_chart_data:
chart_data, _ = self._to_chart_data_url(data)
return ColumnSummaries(
diff --git a/pyproject.toml b/pyproject.toml
index d6535cb15c..12279e9c78 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -526,6 +526,7 @@ format_on_save = true
[tool.marimo.experimental]
multi_column = true
+performant_table_charts = true
[tool.marimo.display]
dataframes = "rich"