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
|
|
@ -23,9 +23,10 @@ function ly_min_h(c: UiNode) -> float {
|
|||
return c.mh
|
||||
}
|
||||
# `sizes` (the children from..to) shrunk by `over` in all
|
||||
function ly_shrink_line(n: UiNode, from: int, sizes: []float, over0: float) -> void {
|
||||
function ly_shrink_line(ui_st: mut UiState, depth: int, n: UiNode, from: int, sizes: []float, over0: float) -> void {
|
||||
var over = over0
|
||||
let frozen = new []bool
|
||||
let frozen = ui_st.ly_frozen[depth]
|
||||
List.clear(frozen)
|
||||
for k in 0 .. len(sizes) { push(frozen, n.children[from + k].pos >= 2) }
|
||||
for pass in 0 .. 8 {
|
||||
var wsum = 0.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue