runtime, ludic.ui: a scalar Value is one allocation, not three (lists only for a list or an object); layout and cascade lists kept a depth; small numbers' text made once - benchmark 63 -> 36 KB a frame
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1d40f6d95a
commit
46888b6716
14 changed files with 84 additions and 33 deletions
|
|
@ -3,9 +3,12 @@
|
|||
# specificity as one sheet's are. On a tie the user's rule wins (the outermost user's last), as a
|
||||
# later rule does. Then `order`, which rearranges a flex box's children without touching the tree.
|
||||
function cs_merged(ui_st: mut UiState, n: UiNode) -> void {
|
||||
let rules = new []UiRule
|
||||
let envs = new []UiEnv
|
||||
let seen = new []UiSheet
|
||||
let rules = ui_st.cs_rules # kept and emptied: a merge runs once an element, never inside another
|
||||
let envs = ui_st.cs_envs
|
||||
let seen = ui_st.cs_seen
|
||||
List.clear(rules)
|
||||
List.clear(envs)
|
||||
List.clear(seen)
|
||||
if n.sheet != null { cs_gather(ui_st, n, n.sheet, n.env, rules, envs, seen) }
|
||||
for i in 0 .. len(n.ups) {
|
||||
if n.ups[i].sheet != null { cs_gather(ui_st, n, n.ups[i].sheet, n.ups[i].env, rules, envs, seen) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue