localvoid / ivi

Lighweight Embeddable Web UI Library
MIT License
719 stars 21 forks source link

updating js-framework-benchmark to @ivi/htm #63

Open leeoniya opened 10 months ago

leeoniya commented 10 months ago

hey @localvoid :)

i'd like to update the keyed implementation of ivi in js-framework benchmark to use @ivi/htm since it feels like better DX, and less stuff to learn.

when porting things over and updating the dependencies, i noticed some differences in the compiled output bundle which may be less optimized than the original. i expected identical output. some of it might be related to recent whitespace tweaks, but i don't think all of it is. maybe i also made a mistake in porting over the template syntax?

i made a separate repo with the bundle committed so you can easily diff the output, can you plz take a look at each of the last 3 commits and see if you notice anything sub-optimal?

https://github.com/leeoniya/js-fr-bench-ivi/commits/main/

also, i have not actually verified if this actually still works :D

localvoid commented 10 months ago

i expected identical output.

Probably because original implementation used textContent optimization with = syntax: a @click=${onSelect} =${entry.label}

can you plz take a look at each of the last 3 commits and see if you notice anything sub-optimal?

Seems fine. Without .textContent="{}" it is going to consume slightly more memory, but I don't mind.