maciejhirsz / kobold

Easy declarative web interfaces.
https://docs.rs/kobold/
Mozilla Public License 2.0
385 stars 7 forks source link

`ListProduct` simplified #96

Closed maciejhirsz closed 2 months ago

maciejhirsz commented 2 months ago

This PR is reverting ListProduct storage to Vec<Box<_>> from PageList (see https://maciej.codes/2023-04-28-optimizing-kobold.html).

I managed to keep this implementation relatively light on Wasm size compared to my initial one. To implement keyed lists and finally getting Kobold up on the js-framework-benchmark the individual list items need to have their own stable pointers. Even though this might introduce some memory fragmentation, it should also improve things slightly since iteration over the list cannot be simpler.

There is also some room for optimization for "flat" array-backed lists that are bounded to some const N: usize length.