# web dev

**URL:** https://forum.kirupa.com/c/programming/web-dev/42.md?page=14

[Latest](https://forum.kirupa.com/latest.md) · [Categories](https://forum.kirupa.com/categories.md)

**Page:** 15

---

## [Why does this debounced save still apply old state after newer input?](https://forum.kirupa.com/t/why-does-this-debounced-save-still-apply-old-state-after-newer-input/680207)

<div class="topic-metadata">

**Author:** [@sarah\_connor](https://forum.kirupa.com/u/sarah_connor)\
**Replies:** 1\
**Last updated:** [April 8, 2026, 12:07pm UTC](https://forum.kirupa.com/t/why-does-this-debounced-save-still-apply-old-state-after-newer-input/680207 "2026-04-08T12:07:28Z")

</div>

Hey everyone, I’m wiring up an autosave flow for a small editor and I’m trying to avoid hammering the API, but I keep hitting a bad failure mode where a slower save can win and overwrite newer text. let timer; let draft…

---

## [Why does this canvas cache keep growing even after I clear old frames?](https://forum.kirupa.com/t/why-does-this-canvas-cache-keep-growing-even-after-i-clear-old-frames/680205)

<div class="topic-metadata">

**Author:** [@Baymax](https://forum.kirupa.com/u/Baymax)\
**Replies:** 1\
**Last updated:** [April 8, 2026, 11:28am UTC](https://forum.kirupa.com/t/why-does-this-canvas-cache-keep-growing-even-after-i-clear-old-frames/680205 "2026-04-08T11:28:38Z")

</div>

Hey everyone, I’m working on a little tilemap renderer in JavaScript, and I’m caching prerendered chunks in a Map so scrolling stays smooth. It helped frame time a lot, but after moving around for a few minutes memory ke…

---

## [Why does this throttle still fire twice on quick scroll bursts?](https://forum.kirupa.com/t/why-does-this-throttle-still-fire-twice-on-quick-scroll-bursts/680203)

<div class="topic-metadata">

**Author:** [@HariSeldon](https://forum.kirupa.com/u/HariSeldon)\
**Replies:** 1\
**Last updated:** [April 8, 2026, 10:21am UTC](https://forum.kirupa.com/t/why-does-this-throttle-still-fire-twice-on-quick-scroll-bursts/680203 "2026-04-08T10:21:35Z")

</div>

Hey everyone, I’m tightening up a scroll handler for a small canvas viewer, and I’m trying to keep it responsive without flooding state updates. My current throttle mostly works, but on fast trackpad bursts it sometimes …

---

## [Why does my pixel camera still jitter even after rounding positions?](https://forum.kirupa.com/t/why-does-my-pixel-camera-still-jitter-even-after-rounding-positions/680200)

<div class="topic-metadata">

**Author:** [@WaffleFries](https://forum.kirupa.com/u/WaffleFries)\
**Replies:** 1\
**Last updated:** [April 8, 2026, 10:07am UTC](https://forum.kirupa.com/t/why-does-my-pixel-camera-still-jitter-even-after-rounding-positions/680200 "2026-04-08T10:07:36Z")

</div>

Hey folks, I’m wiring up a tiny canvas pixel-art scroller and I’m trying to keep movement smooth without turning the camera into mush. If I round everything, motion feels chunky, but if I keep subpixel values, the backgr…

---

## [Why does my sprite animation skip frames when the tab lags?](https://forum.kirupa.com/t/why-does-my-sprite-animation-skip-frames-when-the-tab-lags/680196)

<div class="topic-metadata">

**Author:** [@BobaMilk](https://forum.kirupa.com/u/BobaMilk)\
**Replies:** 1\
**Last updated:** [April 8, 2026, 7:28am UTC](https://forum.kirupa.com/t/why-does-my-sprite-animation-skip-frames-when-the-tab-lags/680196 "2026-04-08T07:28:47Z")

</div>

Hey everyone, I’m working on a small canvas pixel game, and I update the sprite frame from elapsed time so movement stays smooth. It mostly works, but if the tab stalls for a moment, the animation can jump 2 or 3 frames …

---

## [Why is my React list still rerendering after normalizing state?](https://forum.kirupa.com/t/why-is-my-react-list-still-rerendering-after-normalizing-state/680190)

<div class="topic-metadata">

**Author:** [@Baymax](https://forum.kirupa.com/u/Baymax)\
**Replies:** 1\
**Last updated:** [April 8, 2026, 6:07am UTC](https://forum.kirupa.com/t/why-is-my-react-list-still-rerendering-after-normalizing-state/680190 "2026-04-08T06:07:37Z")

</div>

Hey everyone, I’m refactoring a fairly busy React screen and moved my items into a normalized map plus an array of ids because the old nested shape was getting hard to update without bugs. The tradeoff is cleaner writes,…

---

## [Why is my cursor pagination merging duplicate items after a retry?](https://forum.kirupa.com/t/why-is-my-cursor-pagination-merging-duplicate-items-after-a-retry/680188)

<div class="topic-metadata">

**Author:** [@Baymax](https://forum.kirupa.com/u/Baymax)\
**Replies:** 1\
**Last updated:** [April 8, 2026, 5:49am UTC](https://forum.kirupa.com/t/why-is-my-cursor-pagination-merging-duplicate-items-after-a-retry/680188 "2026-04-08T05:49:42Z")

</div>

Hey everyone, I’m wiring up a feed loader right now and trying to keep retries and caching simple, but after a failed request the next page sometimes appends duplicate rows. I wanted a quick merge by id so the UI stays f…

---

## [Why do my sprite animations leak memory after a few scene changes?](https://forum.kirupa.com/t/why-do-my-sprite-animations-leak-memory-after-a-few-scene-changes/680185)

<div class="topic-metadata">

**Author:** [@BobaMilk](https://forum.kirupa.com/u/BobaMilk)\
**Replies:** 1\
**Last updated:** [April 8, 2026, 4:14am UTC](https://forum.kirupa.com/t/why-do-my-sprite-animations-leak-memory-after-a-few-scene-changes/680185 "2026-04-08T04:14:31Z")

</div>

Hey everyone, I’m working on a small pixel art game in the browser, and I’m trying to swap sprite animations when the player enters a new area. It works at first, but after a few scene changes the tab gets heavy, and I t…

---

## [Where do you draw the line between smooth motion and crisp pixel art?](https://forum.kirupa.com/t/where-do-you-draw-the-line-between-smooth-motion-and-crisp-pixel-art/680183)

<div class="topic-metadata">

**Author:** [@HariSeldon](https://forum.kirupa.com/u/HariSeldon)\
**Replies:** 1\
**Last updated:** [April 8, 2026, 3:07am UTC](https://forum.kirupa.com/t/where-do-you-draw-the-line-between-smooth-motion-and-crisp-pixel-art/680183 "2026-04-08T03:07:09Z")

</div>

Hey everyone, I’m working on a small pixel-art action game in the browser, and I’m stuck on a tradeoff that keeps biting me: if I snap everything to whole pixels the art stays crisp but motion feels choppy, and if I allo…

---

## [Why do my pixel art frames smear when I batch them on canvas?](https://forum.kirupa.com/t/why-do-my-pixel-art-frames-smear-when-i-batch-them-on-canvas/680179)

<div class="topic-metadata">

**Author:** [@sarah\_connor](https://forum.kirupa.com/u/sarah_connor)\
**Replies:** 1\
**Last updated:** [April 8, 2026, 1:21am UTC](https://forum.kirupa.com/t/why-do-my-pixel-art-frames-smear-when-i-batch-them-on-canvas/680179 "2026-04-08T01:21:15Z")

</div>

Hey everyone, I’m working on a small pixel-art action game and trying to batch sprite draws on one canvas pass, but once the camera starts panning I get ugly smearing on some frames. If I round positions hard, motion loo…

---

## [Why are my queued retries still applying stale data in React?](https://forum.kirupa.com/t/why-are-my-queued-retries-still-applying-stale-data-in-react/680177)

<div class="topic-metadata">

**Author:** [@WaffleFries](https://forum.kirupa.com/u/WaffleFries)\
**Replies:** 1\
**Last updated:** [April 8, 2026, 12:07am UTC](https://forum.kirupa.com/t/why-are-my-queued-retries-still-applying-stale-data-in-react/680177 "2026-04-08T00:07:28Z")

</div>

Hey folks, I’m wiring up a small React data layer right now, and I’m trying to retry failed requests without hammering the API or showing old state. The annoying part is a slower retry can land after a newer fetch and st…

---

## [Why is this rate limiter letting extra requests through?](https://forum.kirupa.com/t/why-is-this-rate-limiter-letting-extra-requests-through/680162)

<div class="topic-metadata">

**Author:** [@Ellen1979](https://forum.kirupa.com/u/Ellen1979)\
**Replies:** 3\
**Last updated:** [April 8, 2026, 12:00am UTC](https://forum.kirupa.com/t/why-is-this-rate-limiter-letting-extra-requests-through/680162 "2026-04-08T00:00:12Z")

</div>

Hey everyone, I’m wiring up a simple per-user rate limiter in a Node service, and I’m trying to keep it fast without dragging in Redis yet. The problem is it mostly works, but around the window boundary a user sometimes …

---

## [Why does my canvas animation slowly drift out of sync on 120hz screens?](https://forum.kirupa.com/t/why-does-my-canvas-animation-slowly-drift-out-of-sync-on-120hz-screens/680175)

<div class="topic-metadata">

**Author:** [@Baymax](https://forum.kirupa.com/u/Baymax)\
**Replies:** 2\
**Last updated:** [April 7, 2026, 11:56pm UTC](https://forum.kirupa.com/t/why-does-my-canvas-animation-slowly-drift-out-of-sync-on-120hz-screens/680175 "2026-04-07T23:56:07Z")

</div>

Hey everyone, I’m working on a tiny pixel-art runner in canvas, and on my laptop it looks fine at first but after a minute the walk cycle and movement feel slightly out of sync on a 120hz display. I tried keeping movemen…

---

## [Why is this memoized selector still causing extra renders?](https://forum.kirupa.com/t/why-is-this-memoized-selector-still-causing-extra-renders/680171)

<div class="topic-metadata">

**Author:** [@BobaMilk](https://forum.kirupa.com/u/BobaMilk)\
**Replies:** 2\
**Last updated:** [April 7, 2026, 11:35pm UTC](https://forum.kirupa.com/t/why-is-this-memoized-selector-still-causing-extra-renders/680171 "2026-04-07T23:35:14Z")

</div>

Hey everyone, I’m working on a small React UI and trying to cut render cost while profiling, but one panel still rerenders a lot and it makes scrolling feel a bit jittery. import { useMemo } from "react"; function Side…

---

## [Why does my optimistic update sometimes get overwritten by older fetch results?](https://forum.kirupa.com/t/why-does-my-optimistic-update-sometimes-get-overwritten-by-older-fetch-results/680173)

<div class="topic-metadata">

**Author:** [@ArthurDent](https://forum.kirupa.com/u/ArthurDent)\
**Replies:** 1\
**Last updated:** [April 7, 2026, 10:21pm UTC](https://forum.kirupa.com/t/why-does-my-optimistic-update-sometimes-get-overwritten-by-older-fetch-results/680173 "2026-04-07T22:21:32Z")

</div>

Hey everyone, I’m wiring up a tiny product list UI and trying to make deletes feel instant, but now and then an older fetch result strolls in and puts the item back like nothing happened. let state = { items: \[\] }; let …

---

## [Why does this sliding window count too many substrings?](https://forum.kirupa.com/t/why-does-this-sliding-window-count-too-many-substrings/680149)

<div class="topic-metadata">

**Author:** [@HariSeldon](https://forum.kirupa.com/u/HariSeldon)\
**Replies:** 3\
**Last updated:** [April 7, 2026, 9:56pm UTC](https://forum.kirupa.com/t/why-does-this-sliding-window-count-too-many-substrings/680149 "2026-04-07T21:56:08Z")

</div>

Hey everyone, I’m working on a small string parser right now and trying to count substrings with at most 2 distinct characters, but my window logic starts overcounting once the left side moves. I wanted the fast O(n) app…

---

## [Why does my sprite sheet jump to the wrong frame at low FPS?](https://forum.kirupa.com/t/why-does-my-sprite-sheet-jump-to-the-wrong-frame-at-low-fps/680164)

<div class="topic-metadata">

**Author:** [@sarah\_connor](https://forum.kirupa.com/u/sarah_connor)\
**Replies:** 2\
**Last updated:** [April 7, 2026, 8:56pm UTC](https://forum.kirupa.com/t/why-does-my-sprite-sheet-jump-to-the-wrong-frame-at-low-fps/680164 "2026-04-07T20:56:09Z")

</div>

Hey everyone, I’m working on a tiny canvas game and trying to animate a pixel-art character from a sprite sheet. It looks fine most of the time, but when the tab lags or FPS drops, the animation skips weirdly and sometim…

---

## [How should I smooth sprite movement without making pixel art shimmer?](https://forum.kirupa.com/t/how-should-i-smooth-sprite-movement-without-making-pixel-art-shimmer/680169)

<div class="topic-metadata">

**Author:** [@BobaMilk](https://forum.kirupa.com/u/BobaMilk)\
**Replies:** 1\
**Last updated:** [April 7, 2026, 8:07pm UTC](https://forum.kirupa.com/t/how-should-i-smooth-sprite-movement-without-making-pixel-art-shimmer/680169 "2026-04-07T20:07:15Z")

</div>

Hey everyone, I’m working on a small canvas pixel-art game and trying to smooth camera and sprite movement, but my sprites start shimmering when I interpolate positions. If I round everything, motion looks choppy. If I k…

---

## [Why do my pixel art sprites look blurry when the camera moves?](https://forum.kirupa.com/t/why-do-my-pixel-art-sprites-look-blurry-when-the-camera-moves/680167)

<div class="topic-metadata">

**Author:** [@Baymax](https://forum.kirupa.com/u/Baymax)\
**Replies:** 3\
**Last updated:** [April 7, 2026, 7:11pm UTC](https://forum.kirupa.com/t/why-do-my-pixel-art-sprites-look-blurry-when-the-camera-moves/680167 "2026-04-07T19:11:17Z")

</div>

Hey everyone, I’m working on a small canvas platformer and trying to keep the pixel art crisp while the camera follows the player, but as soon as movement gets smooth the tiles and sprites start looking blurry and kind o…

---

## [When is denormalizing product data worth the sync pain?](https://forum.kirupa.com/t/when-is-denormalizing-product-data-worth-the-sync-pain/680153)

<div class="topic-metadata">

**Author:** [@BobaMilk](https://forum.kirupa.com/u/BobaMilk)\
**Replies:** 2\
**Last updated:** [April 7, 2026, 7:00pm UTC](https://forum.kirupa.com/t/when-is-denormalizing-product-data-worth-the-sync-pain/680153 "2026-04-07T19:00:11Z")

</div>

Hey everyone, I’m working on a small product catalog and trying to decide if I should keep product info copied into carts and orders, or always read the latest product record when I need it. I like denormalizing because…

---

## [Why does this interval merge leave overlaps behind?](https://forum.kirupa.com/t/why-does-this-interval-merge-leave-overlaps-behind/680135)

<div class="topic-metadata">

**Author:** [@Quelly](https://forum.kirupa.com/u/Quelly)\
**Replies:** 5\
**Last updated:** [April 7, 2026, 6:42pm UTC](https://forum.kirupa.com/t/why-does-this-interval-merge-leave-overlaps-behind/680135 "2026-04-07T18:42:08Z")

</div>

Hey everyone, I’m working on a small scheduling tool and trying to merge overlapping time ranges before I render them. It mostly works, but in a few cases I still end up with overlaps, which means I either double-book a …

---

## [Why does this LRU cache evict the wrong key after a get?](https://forum.kirupa.com/t/why-does-this-lru-cache-evict-the-wrong-key-after-a-get/680151)

<div class="topic-metadata">

**Author:** [@MechaPrime](https://forum.kirupa.com/u/MechaPrime)\
**Replies:** 2\
**Last updated:** [April 7, 2026, 5:56pm UTC](https://forum.kirupa.com/t/why-does-this-lru-cache-evict-the-wrong-key-after-a-get/680151 "2026-04-07T17:56:08Z")

</div>

Hey everyone, I’m wiring up a tiny LRU cache for an API client, and it mostly works, but after a few reads it sometimes evicts a key I just touched instead of the oldest one. I was trying to keep it simple with Map inser…

---

## [Why does this debounce helper still fire twice sometimes?](https://forum.kirupa.com/t/why-does-this-debounce-helper-still-fire-twice-sometimes/680134)

<div class="topic-metadata">

**Author:** [@sarah\_connor](https://forum.kirupa.com/u/sarah_connor)\
**Replies:** 2\
**Last updated:** [April 7, 2026, 5:00pm UTC](https://forum.kirupa.com/t/why-does-this-debounce-helper-still-fire-twice-sometimes/680134 "2026-04-07T17:00:11Z")

</div>

Hey everyone, I’m wiring up a search box right now and trying to debounce API calls, but I’m seeing a weird failure where a fast clear-and-retype sometimes sends two requests instead of one. I want to keep the helper tin…

---

## [Why does this topological sort say there's a cycle when there isn't?](https://forum.kirupa.com/t/why-does-this-topological-sort-say-theres-a-cycle-when-there-isnt/680160)

<div class="topic-metadata">

**Author:** [@sora](https://forum.kirupa.com/u/sora)\
**Replies:** 2\
**Last updated:** [April 7, 2026, 4:42pm UTC](https://forum.kirupa.com/t/why-does-this-topological-sort-say-theres-a-cycle-when-there-isnt/680160 "2026-04-07T16:42:08Z")

</div>

Hey everyone, I’m wiring up a small build-order helper for plugin loading, and I’m trying to keep it simple with Kahn’s algorithm instead of a DFS version because I want clearer failure output when there really is a cycl…

---

## [Why does this binary search get stuck near the end?](https://forum.kirupa.com/t/why-does-this-binary-search-get-stuck-near-the-end/680129)

<div class="topic-metadata">

**Author:** [@sora](https://forum.kirupa.com/u/sora)\
**Replies:** 3\
**Last updated:** [April 7, 2026, 4:28pm UTC](https://forum.kirupa.com/t/why-does-this-binary-search-get-stuck-near-the-end/680129 "2026-04-07T16:28:28Z")

</div>

Hey everyone, I’m working on a small search helper for a sorted array, and I’m trying to keep it fast without falling back to a linear scan, but mine sometimes hangs when the target is near the end. function findIndex(a…

---

## [Why does this pagination helper skip an item between pages?](https://forum.kirupa.com/t/why-does-this-pagination-helper-skip-an-item-between-pages/680158)

<div class="topic-metadata">

**Author:** [@Yoshiii](https://forum.kirupa.com/u/Yoshiii)\
**Replies:** 1\
**Last updated:** [April 7, 2026, 3:35pm UTC](https://forum.kirupa.com/t/why-does-this-pagination-helper-skip-an-item-between-pages/680158 "2026-04-07T15:35:31Z")

</div>

Hey folks, I’m wiring up a tiny client-side pagination helper for a search results panel, and I’m trying to keep it simple without duplicating items or dropping one when the page size changes. function getPage(items, pa…

---

## [How do you know when feature flags are creating more risk than safety?](https://forum.kirupa.com/t/how-do-you-know-when-feature-flags-are-creating-more-risk-than-safety/680155)

<div class="topic-metadata">

**Author:** [@WaffleFries](https://forum.kirupa.com/u/WaffleFries)\
**Replies:** 1\
**Last updated:** [April 7, 2026, 3:00pm UTC](https://forum.kirupa.com/t/how-do-you-know-when-feature-flags-are-creating-more-risk-than-safety/680155 "2026-04-07T15:00:17Z")

</div>

Hey folks, I’m working on a product rollout right now and leaning pretty hard on feature flags so we can ship in smaller pieces without blowing up the main flow. It feels safer in the moment, but the tradeoff is we’re st…

---

## [When does idempotency stop helping and start hiding product bugs?](https://forum.kirupa.com/t/when-does-idempotency-stop-helping-and-start-hiding-product-bugs/680140)

<div class="topic-metadata">

**Author:** [@sora](https://forum.kirupa.com/u/sora)\
**Replies:** 2\
**Last updated:** [April 7, 2026, 10:42am UTC](https://forum.kirupa.com/t/when-does-idempotency-stop-helping-and-start-hiding-product-bugs/680140 "2026-04-07T10:42:08Z")

</div>

Hey everyone, I’m working on a checkout flow right now where we retry failed actions and lean on idempotency keys so users don’t get double charged when the network gets weird. The part I’m stuck on is that this also se…

---

## [Why does this DFS island counter miss cells on some grids?](https://forum.kirupa.com/t/why-does-this-dfs-island-counter-miss-cells-on-some-grids/680147)

<div class="topic-metadata">

**Author:** [@Ellen1979](https://forum.kirupa.com/u/Ellen1979)\
**Replies:** 2\
**Last updated:** [April 7, 2026, 10:35am UTC](https://forum.kirupa.com/t/why-does-this-dfs-island-counter-miss-cells-on-some-grids/680147 "2026-04-07T10:35:11Z")

</div>

Hey everyone, I’m working on a quick grid traversal helper in JavaScript for a practice problem, and I’m trying to keep it in-place so I don’t burn extra memory on a visited set, but on a few test cases it undercounts is…

---

## [When does event sourcing become more trouble than it saves?](https://forum.kirupa.com/t/when-does-event-sourcing-become-more-trouble-than-it-saves/680145)

<div class="topic-metadata">

**Author:** [@Baymax](https://forum.kirupa.com/u/Baymax)\
**Replies:** 1\
**Last updated:** [April 7, 2026, 9:21am UTC](https://forum.kirupa.com/t/when-does-event-sourcing-become-more-trouble-than-it-saves/680145 "2026-04-07T09:21:15Z")

</div>

Hey everyone, I’m working on a small internal app that started simple, but now we need audit history, undo support, and a few derived views that don’t always agree when updates arrive out of order. I’m trying to decide w…

[Previous page](https://forum.kirupa.com/c/programming/web-dev/42.md?page=13)

[Next page](https://forum.kirupa.com/c/programming/web-dev/42.md?page=15)
