MiniCTRM - Build Tutorial 631: Performance: compress market data, keep a save fast
→ to begin · N for the speaker notes
On a phone: Next or a swipe left to begin, Notes for the words.
What you'll learn
A timing log with a Timings screen and a written baseline; a query budget test on the save, the preview and the blotter page; closes and valuation runs stored compressed - closes about twenty times smaller, runs some fifty - read through their one stores with extract tables for SQL that application code never reads; indexes added from real query plans, each with a test; and a front end split by screen with big grids fetched a page at a time - every number measured before and after.
Measure first – A timing log with a query count on every operation, a Timings screen, and a baseline written down before anything changes.
A query budget – The N+1 problem from zero, and a test that holds the save, the preview and the blotter page to a fixed number of queries.
Compressed closes and runs – A packed strip - closes about twenty times smaller, runs some fifty - read through the one store, with extract tables for SQL that application code never reads.
Indexes from real queries – What an index is and what it costs, the query plan, and indexes added only where measuring says so.
Screens that load lazily – A bundle split by screen, the Launcher's first paint, and big grids fetched a page at a time.
Ship it – /ship, with the budgets, the round trips and the query plans among the tests.
How MiniCTRM did it – Close Storage and Database Size, live, and the one-door rule that made compression a change to one class.
Copyright 2026-2027 Brian Shydlo. MiniCTRM is source-available under the PolyForm Strict License 1.0.0 (https://polyformproject.org/licenses/strict/1.0.0): free for learning and other noncommercial use; no changes and no redistribution; commercial use needs permission.
Welcome
Two seconds and an hour
1 / 15Measure first
Measured, never guessed
2 / 15Measure first
A timing log and a baseline
3 / 15A query budget
One query, not one per row
4 / 15A query budget
The budget tests, and the save made to pass them
5 / 15Compressed closes and runs
A packed strip: closes twenty times smaller, runs fifty
6 / 15Compressed closes and runs
Compressed closes, compressed runs, and the extract tables
7 / 15Indexes from real queries
An index, from zero
8 / 15Indexes from real queries
Indexes where the plans ask for them
9 / 15Screens that load lazily
A bundle, and a page at a time
10 / 15Screens that load lazily
Lazy screens and paged grids
11 / 15Ship it
Ship it
12 / 15How MiniCTRM did it
Close Storage and Valuation Storage
13 / 15How MiniCTRM did it
Database Size, and the blotter's indexes
14 / 15What you have now
What you have now
15 / 15
You have finished lesson 631, Performance: compress market data, keep a save fast.