Performance
How Flowscope stays fast with many charts, the measured numbers, and the performance overlay.
Flowscope is built to keep sixty charts open, each with its own heatmap and order flow, without the interface thread doing market work. Markets are processed in parallel on a worker pool; the interface only reads and paints.
How the work is split
| Where | What runs there |
|---|---|
| Network threads (two on desktop) | Websocket decoding and routing by symbol |
| Engine workers (cores − 1 on desktop) | One actor per market: book, liquidity runs, tape, bars, footprints, context. Heatmap rasters run as jobs. |
| Interface thread | Reads each pane’s data under a short lock and paints |
Each market actor drains up to 512 messages, applies them under one write lock, and does follow-up work (snapshots, history paging, series rebuilds) outside the lock. Idle workers park until their mailbox wakes them.
In the browser there are no threads. The engine runs actors and jobs for up to 8 ms per frame, and network callbacks feed the same mailboxes.
A chart converts only new bars each frame and recomputes studies only when their inputs or the bars changed. Costly aggregates of live data (profiles, bubbles, the book) refresh a few times a second.
Measured
Simulator, 60 charts with heatmap, bubbles and book profile over 40 markets, release build under Xvfb with software OpenGL (llvmpipe):
| Measure | Value |
|---|---|
| Events processed | ~4 200 / s |
| Market memory | 137 MB |
| Process RSS | ~430 MB |
| Interface CPU per frame | 6.1 ms average, 9.3 ms max |
| Heatmap rasters | 90 / s |
| Engine worker CPU | Near zero |
The frame rate in that run, 11 fps, was bound by software rasterization. On a GPU that cost moves off the CPU.
Live, with BTC on all five venues plus ETH and books running, the probe runs saw 0 decode errors and 0 reconnects.
Run the load test
make stressThis starts the release build on the simulator with the 60 charts (load test) preset and the performance overlay open. It is the same as:
FLOWSCOPE_SIM=1 FLOWSCOPE_PRESET=stress FLOWSCOPE_PERF=1 cargo run --release -p flowscopeTo watch the overlay on live data:
make perfThe load-test preset is available through make stress or FLOWSCOPE_PRESET=stress; Add pane is reserved for individual charts and widgets.
The performance overlay
Toggle it with the pulse icon in the top bar, or start with FLOWSCOPE_PERF set. Values are measured over rolling one-second windows.
| Row | Meaning |
|---|---|
| Frame rate | Frames painted per second |
| UI frame time | Interface CPU per frame, average and maximum |
| Panes | Panes in the layout |
| Heatmap rasters | Raster jobs finished per second |
| Markets | Markets open in the engine |
| Market memory | Memory held by all markets |
| Events | Market events processed per second |
| Workers | Engine worker threads |
| Actors | Tasks running on the workers |
| Queued jobs | Background jobs waiting |
| Connections | Open websocket connections |
| Frames | Websocket frames received per second |
| Bandwidth | Network bytes received per second |
| Reconnects | Reconnects since start |
| Decode errors | Messages that failed to decode |
The bottom bar shows a short summary at all times: markets open, market memory, events per second and frame rate.
Rising Queued jobs means the workers cannot keep up. Rising Reconnects or Decode errors points at the network or a venue, not at Flowscope’s rendering.
Memory
The engine has a fixed budget, 3 GB on the desktop and 768 MB in the browser, divided among the open markets. When a market reaches its share, the oldest chunks leave memory first. Footprint days load from the data hub again when needed. See History and data.
Tips
- Use the release build (
make release) for real work.make desktopruns an unoptimized debug build. - Maximizing a pane (double-click its header) draws that pane alone until you restore it.