Experimental browser for the Atmosphere
Loading post...
{ "uri": "at://did:plc:zssfdeofbvglij3hgak45ntu/app.bsky.feed.like/3lbe5gbvrt323", "cid": "bafyreif42lw5rlukbqmbqodwoqyf4awx4xnibbiitvcmv5xttqmx2hvpsa", "value": { "$type": "app.bsky.feed.like", "subject": { "cid": "bafyreidpr25uxg2h2hrougkdnzihqdyabsxwklwq4ytk5rkh3evcqk23wa", "uri": "at://did:plc:3eljmo2tovydgjxpqv4xppat/app.bsky.feed.post/3lbck722yss2f" }, "createdAt": "2024-11-20T04:47:22.284Z" } }
one easy way to reduce component initialization cost is to move the logic out of the component and into lazily-computed state. In your linked example, you have multiple O(n^2) lookups happening on first render, and much of that computation could be precomputed+reused if hoisted.
Nov 19, 2024, 1:30 PM