# Let a page be read live as a frame and element slices · dara/icarus

[View on GitCafe](https://git.cafe/dara/icarus/commit/32dc730d822396046677074cb0c1d88eb43a90d2)

Repository: [dara/icarus](https://git.cafe/dara/icarus)

Visibility: public

Requested revision: 32dc730d822396046677074cb0c1d88eb43a90d2

Requested commit: 32dc730d822396046677074cb0c1d88eb43a90d2

Commit: 32dc730d822396046677074cb0c1d88eb43a90d2

Tree: e1394030818112c8accbd7002ecb6b59aa4399a2

Author: Dara Adedeji

Committer: Dara Adedeji

## Message

```
Let a page be read live as a frame and element slices

Convex re-runs a live query in full whenever a row it read is written, so
the editor's page:getSnapshot subscription re-reads every row of the page
after every edit: 58.5 KB on an 87-element page, measured on a local
deployment with dev's data. Add page:getFrame (the page, its settings, its
lineups and their images) and page:getElementSlice (the page's elements in
one public-id range, with their images, and picture aliases apart), backed
by a new elements.by_pageId_and_publicId index. Read as a frame plus slices
covering every id, a page holds what page:getSnapshot returns, and an edit
re-runs only the slice holding its row: 10.7 KB with 8 slices.

Additive only: getSnapshot answers as before (now sharing its helpers), and
no client reads the new queries yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

```

## Parents

- [5c7b867a89ca6a103541b201e24d70caba24be06](https://git.cafe/dara/icarus/commit/5c7b867a89ca6a103541b201e24d70caba24be06?format=markdown)

[Source at this commit](https://git.cafe/dara/icarus/tree/32dc730d822396046677074cb0c1d88eb43a90d2?format=markdown)
