Project ideas from Hacker News discussions.

P99 0 ms* autocomplete for 240M domain names

📝 Discussion Summary (Click to expand)

Theme 1 – Perceived latency matters more than raw timing, and using keyup hurts UX
- “When it comes to UX, perceived latency is king.” – dbalatero
- “The perceived latency starts from keydown, not keyup. Redefining latency to start at keyup reduces measured latency, not perceived latency, and delaying the visual display to keyup makes perceived latency strictly worse.” – wky
- “Using keyup makes no sense and is inconsistent with user expectations.” – chrismorgan

Theme 2 – Speculative pre‑fetch / prediction techniques can shave latency
- “They already did a search based on the previous characters that returned results for all possible next characters. So by the time you type a second character it just checks results locally from the search that had likely already been returned from when you had typed the previous character.” – weird‑eye‑issue
- “I think you could get a lot closer by framing this as an optimization problem… add a residual prediction which aims to cover as much of the remaining domain name tree as possible weighted by popularity.” – ViscountPenguin
- “If you’d like to reduce the network latency further you can store each trie node as a file… dump the few hundred million files onto R2… Now the traversal can be done completely via CDN lookups!” – kevmo314

Theme 3 – Real‑world constraints limit the usefulness of ultra‑low latency tricks
- “KeyDown events don’t work great for mobile.” – cortesoft
- “What happens when someone pastes a domain or uses IME or voice input?” – ChannelFence
- “Once you factor in monitor refresh rates then you can get to levels of optimization where it simply doesn't matter because you are constrained by waiting for the refresh rate anyways.” – weird‑eye‑issue
- “This autocomplete suggests domains that don't exist… makes it less useful.” – skybrian


🚀 Project Ideas

Generating project ideas…

InstantFeedback.js

Summary

  • Provides zero‑perceived‑latency UI feedback by triggering autocomplete/display on keydown (or input) while safely handling IME, paste, voice, and repeat‑key scenarios.
  • Core value: developers get instant, responsive feel without the lag introduced by keyup‑only approaches, improving perceived performance especially on high‑latency networks.

Details

Key Value
Target Audience Frontend engineers building search/autocomplete widgets (e.g., domain finders, code editors)
Core Feature Library that wraps keydown/input events, debounces expensive lookups, renders suggestions via requestAnimationFrame, and falls back to keyup for edge cases
Tech Stack Vanilla JS (ESM), optional TypeScript definitions, works with React/Vue via wrappers
Difficulty Medium
Monetization Hobby

Notes

  • HN users complained that “KeyUp makes no sense and is inconsistent with user expectations” (chrismorgan) and that delaying render to keyup adds latency (wky).
  • Enables discussion about event handling best practices and could be adopted in open‑source autocomplete projects.

DomainSuggest CDN

Summary

  • Pre‑builds a compressed trie of the most popular domain names and serves each node as an individual static asset via an edge CDN (Cloudflare R2 + Workers) for sub‑millisecond lookups.
  • Core value: delivers autocomplete suggestions with near‑zero network latency, even from distant regions, eliminating the perceived lag that frustrated users in Australia and elsewhere.

Details

Key Value
Target Audience Product teams offering domain search, IDE plugins, or any service needing instant prefix‑based suggestions
Core Feature Edge‑hosted trie lookup API that returns matching suffixes for a given prefix; optional fallback to a dynamic resolver for obscure queries
Tech Stack Rust/Wasm to generate trie, stored as flat files, served via Cloudflare Workers/KV or R2; API via HTTP GET; optional UI wrapper
Difficulty High
Monetization Revenue-ready: Usage‑based pricing (e.g., $0.001 per 10k lookups) with free tier

Notes

  • Commenters praised the CDN idea: “store each trie node as a file…dump the few hundred million files onto R2…traversal can be done completely via CDN lookups!” (kevmo314) and noted that “you could get a lot closer by…pre‑baked tree…p99 0ms even in Australia” (ViscountPenguin).
  • Provides a concrete implementation of the suggested optimization and invites debate on trade‑offs (memory vs freshness, update frequency).

LatencyPerception Meter

Summary

  • A browser devtool extension that measures the interval from keydown (or input) to the first paint of autocomplete suggestions, factoring in monitor refresh rate and requestAnimationFrame timing.
  • Core value: gives developers an accurate perceived‑latency metric, helping them identify where keyup‑only delays or extra rendering steps hurt user experience.

Details

Key Value
Target Audience Web performance engineers, UI/library authors, and site owners who care about responsiveness
Core Feature Records timestamps on keydown, on suggestion render (via MutationObserver or performance.mark), computes p50/p99 perceived latency, highlights frames missed vs refresh rate
Tech Stack TypeScript, WebExtensions API, uses PerformanceObserver and requestAnimationFrame hooks
Difficulty Low
Monetization Hobby

Notes

  • HN thread highlighted the mismatch: “perceived latency starts from keydown, not keyup” (wky) and “KeyDown events don’t work great for mobile” (cortesoft); a tool that measures from keydown would validate these claims.
  • Enables practical utility: teams can set latency budgets and regressions tests, fostering discussion on event handling and rendering pipelines.

Read Later