Skip to content

docs: read the column list once per render - #205

Merged
NullVoxPopuli merged 1 commit into
universal-ember:mainfrom
johanrd:docs-columns-for
Sep 23, 2026
Merged

NullVoxPopuli merged 1 commit into
universal-ember:mainfrom
johanrd:docs-columns-for

Conversation

@johanrd

@johanrd johanrd commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

A tip next to the example that already does this.

columns.for(table) returns a new array on every call, so reading it once per row is O(rows × columns) per render. The examples read it into a getter; this says why.

Secondary to #206, which caches the list and removes the cliff (240 columns, per row: 126.5 → 20.6 ms). Even with that, reading it once is still slightly cheaper, so the tip stands either way. Close whichever you prefer.

Cowritten by Claude

@NullVoxPopuli NullVoxPopuli added the documentation Improvements or additions to documentation label Sep 23, 2026
@NullVoxPopuli
NullVoxPopuli merged commit f1a7a59 into universal-ember:main Sep 23, 2026
15 checks passed
@github-actions github-actions Bot mentioned this pull request Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants