Better HN
topnewbestaskshowjobs
Log inSign up

lowi

2 karma · joined Aug 17, 2021 (5y ago) · 2 submissions

Submissions

comment 3y ago · link · parent

Lit is great, really easy to grasp and to use.

One thing I don't understand in lit (or vuejs, svelte etc...) is why we can't have an each loop that would use information about what has changed.

In my most common case, I am simply updating an item in an array (or removing/adding an item) and the each loop could use the list of operations to do the changes instead of iterating over all the items.

For large array (1000+ items) for a SVG diagramming tool, performance would be much improved, no?

comment 5y ago · link · parent

1. Do you have a recommanded way for i18n integration? 2. What's the performance of updating/adding/deleting a single entry in an array? Will imba just update the html element in O(1) or it will iterate the array to delect the changes?