spacestr

đź”” This profile hasn't been claimed yet. If this is your Nostr profile, you can claim it.

Edit
8020
Member since: 2022-11-10
8020
8020 2d

GIF API.

8020
8020 2d

I'm back working on a web-based client now that this side-quest is released. 👇 Holy feedback cycle, Batman! Native is cool and all, but compiling sucks for UI iteration.

8020
8020 3d

Two Nostr signers at the same time?

8020
8020 4d

We have the Google as well: https://gitworkshop.dev//pomegranate

8020
8020 4d

ditto.pub seems to have an infinite loop bug in `useAuthors`. I noticed because my CPU fan was spinning up when nothing much else was running. I profiled it and asked my clanker to figure it out: ================== **Ditto appears to have a continuous React → database → React feedback loop in its `useAuthors` hook.** That’s the main repeated work in this profile. Across the **9.38-second capture**: | Work | Measured activity | |---|---:| | Ditto’s main page thread | **8.10 seconds of CPU — 86% of one core** | | Timer callbacks traced to `useAuthors` cache updates | **2,461 — about 262/second** | | Time inside those callbacks, including resulting work | **6.61 seconds** | | IndexedDB `success` events | **2,461** | The load stays high throughout the capture, so this isn’t just a brief startup spike. I fetched the exact JavaScript bundle named in your profile. The [deployed `useAuthors` code](https://ditto.pub/assets/useAuthors-jBNN03G9.js) does this: 1. Each render creates a **fresh array** of sorted, unique author IDs. 2. That array is in a `useEffect` dependency list. Its identity changes every render, even when the authors haven’t changed. 3. The effect queries IndexedDB for those authors’ profiles. 4. It writes a **new `Map`** into the `["authors", …]` query cache, even when the profiles are unchanged. 5. The cache update causes another render, restarting the cycle. The profile directly connects those cache writes to the query library’s zero-delay timer scheduler, followed by substantial React rendering work. Its roughly matching timer and database event counts strongly support this diagnosis. The hook’s five-minute `staleTime` doesn’t prevent this: the repeated reads happen in a separate effect. **The developer fix:** make that effect depend on the *contents* of the author list rather than a newly allocated array, and preserve the existing cached `Map` when nothing changed. Both would break the unnecessary update cycle.

8020
8020 4d

Kind 1111 replies to kind 1 notes*

8020
8020 4d

Damus and (maybe) Primal don’t render kind 1111 replies, so makes sense.

8020
8020 4d

Test reply reply

8020
8020 4d

Test reply

8020
8020 4d

Test note

Welcome to 8020 spacestr profile!

About Me

Nostr System Signer - https://codeberg.org/8020/nostr-system-signer Omarchy NSS Plugin - https://codeberg.org/8020/omarchy-nostr-system-signer

Interests

  • No interests listed.

Videos

Music

My store is coming soon!

Friends