You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a non-intrusive execution time indicator that displays the duration of each cell execution directly in the notebook UI. This helps users identify performance bottlenecks and optimize slow cells at a glance.
🎯 Why This Is Valuable
Performance visibility — Instantly see which cells are slow without profiling tools
Learning & debugging — Identify bottlenecks when optimizing code
User feedback — Reassurance that long-running cells are actually executing
Data quality — Spot unexpected slowdowns that might indicate issues
Minimal overhead — Uses Python's time.perf_counter() (virtually no cost)
💡 Implementation Details
Backend
Wrap cell execution in a timer (using time.perf_counter())
Send execution time as metadata with cell output
Format: { cellId, executionTime_ms }
Frontend
Display small badge in cell header: ⏱️ 245ms
Color coding:
Green (< 100ms): fast ✅
Yellow (100ms - 1s): normal ⚠️
Orange (1s - 5s): slow 🟠
Red (> 5s): very slow 🔴
Optional: tooltip showing detailed timing on hover
Example UI
✨ Benefits
No breaking changes — Purely additive feature
Lightweight — Minimal performance impact
Visual appeal — Makes marimo feel more "responsive"
Batteries-included — Fits marimo's philosophy of including useful tools out-of-the-box
Community request — Common in other notebook tools (Jupyter, VS Code, Pluto.jl)
🔧 Estimated Scope
Backend: ~50 lines (timer logic)
Frontend: ~80 lines (React component + styling)
Tests: ~40 lines
Total: ~150 lines (very small change)
📌 Related
This complements marimo's existing reactive system by adding transparency to execution performance.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Feature Request: Cell Execution Time Display
📝 Description
Add a non-intrusive execution time indicator that displays the duration of each cell execution directly in the notebook UI. This helps users identify performance bottlenecks and optimize slow cells at a glance.
🎯 Why This Is Valuable
time.perf_counter()(virtually no cost)💡 Implementation Details
Backend
time.perf_counter()){ cellId, executionTime_ms }Frontend
⏱️ 245msExample UI
✨ Benefits
🔧 Estimated Scope
📌 Related
This complements marimo's existing reactive system by adding transparency to execution performance.
Beta Was this translation helpful? Give feedback.
All reactions