Timing
Marimo
Note
code examples are run using marimo notebooks: https://marimo.io/
Simple timing
- using the
time.perf_counter()function to set the start point, - Calculate it again at the end of what you want, and subtract the difference
File I/O
- File I/O is usually the slowest part of your application
- You can see that parquet files work better in general over CSVs
More detailed timing
- Python has the cProfile module that lets you time all the functions and components
- The
snakevizlibrary helps make the cProfile table a bit more readable
Timing in Shiny for R
- Shiny for R has many tools to help you time your `
Timing in Shiny for Python
- There are no Shiny specific tools for profiling a Shiny for Python app at the moment