Hacker News new | ask | show | jobs
by banashark 294 days ago
Interesting. So it was 11k for the dropdown component, but if you eschew the std lib inclusion (which sounds fairly impractical), it goes down to 3k.

When you have a page with many alpine/nim components like this, how does the size increase relative to the # of components added (roughly of course)?

1 comments

It does increase but slightly. The biggest increase comes from accidentally using copy semantics, which are Nims default. If you use ref everywhere (which makes sense for JS), Nim will not emit a bunch of deep copy helpers.