Skip to content

dmvs_html: bounded layout memory, data-dmod-width, more states - #5

Merged
JohnAmadis merged 1 commit into
mainfrom
feature/claim-channel
Oct 11, 2026
Merged

JohnAmadis merged 1 commit into
mainfrom
feature/claim-channel

Conversation

@JaxCalder

Copy link
Copy Markdown

Summary

  • Bounded memory in layout: the layout buffers (≈196 KB each) were taken from the conversion's arena on every call and never given back - about 225 MB per layout, over 8 GB for the car HMI page, so the host ran out of memory. They are on the heap now and freed: 2.3 MB per layout, 0.7 s for the page, output identical.
  • data-dmod-width="name": binds an element's width to a property of the channel (data-dmod-scale, default 1000; data-dmod-value for the initial value) - progress bars driven by the application.
  • MAX_STATES 48 → 96.

Order

Needs dmvsi 0.6 released.

Test plan

  • ctest: 11/11
  • carhmi-demo's page converts under ulimit -v

🤖 Generated with Claude Code

Every inline layout and every intrinsic size took a 196 kB buffer from the
arena (MAX_ITEMS items), flex layout another; the arena frees nothing until
the page is done, and flex layouts measure their items again and again - a
car HMI page took 225 MB per layout, 8 GB for its 33 states, and a page
with more states ran a build host out of memory. The buffers are taken from
the heap and given back when the function returns: 2.3 MB per layout, the
page converts in 0.7 s instead of 16 s, the view written is the same.

States are cheap now: 96 of them (was 48).

data-dmod-width="name" makes an element as wide as the integer property
`name` says (its laid out width times the property over data-dmod-scale,
1000 by default; data-dmod-value its initial value) - the property one of
dmod.prop(), or made here: a progress bar the application moves. Needs
dmvsi 0.6 (properties and change handlers).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JohnAmadis
JohnAmadis merged commit 493d40a into main Oct 11, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants