One file per chapter, ordered by file name.
foreach ($orders as $order) {
$customer = $this->Customers->get($order->customer_id);
$order->customer_name = $customer->name;
}
$orders = $this->Orders->find()
->contain(['Customers'])
->all();
One query per row above, one query below. The fence walks the audience through it.
| Rows | Queries before | Queries after |
|---|---|---|
| 50 | 51 | 1 |
| 500 | 501 | 1 |
| 5000 | 5001 | 1 |
No query inside a loop.
reveal-carve lint catches a mistyped directive before the room sees itreveal-carve handout turns this deck into a document with the spoken notesreveal-carve watch rebuilds and reloads while you writeQuestions welcome afterwards too.