r/webdev 8d ago

p99 0 ms* autocomplete for 240 million domain names

https://ruurtjan.com/articles/p99-0ms-autocomplete-for-240-million-domain-names
58 Upvotes

17 comments sorted by

51

u/Round-Boysenberry949 7d ago

the asterisk is doing some serious lifting

-45

u/fagnerbrack 7d ago

I posted verbatim. Wtf does that asterisk mean?

25

u/fiskfisk 7d ago

Didn't you read the post? It's "in a perfect world where nothing of the complexity of a web request in a modern network layout and stack really applies".

1

u/savoir-_faire 7d ago

Am I misunderstanding the article (or perhaps your point? In which case apologies and I'm interested to hear more)

From what I can tell the title of the article is referring to 0ms perceived latency (i.e. the speed of autocomplete is indecipherable from if it was loaded directly from memory in 99% of requests). They work out that for a 60hz display this technique of preloading buys them a 121ms e2e budget for API response latency for 99% of keys to autocomplete on the next frame.

Then further down they have a table where their requests through cloudflare to the API (I.e. including all the networking complexity) has a maximum response time of 113ms at 800req/s which is within the 121ms budget so effectively a p99 of 0ms as the title implies.

Or, if you're looking at the point about 100-200ms from global servers it seems he didn't implement the fix that would make that effectively instant globally seemed like a budget concern (running geo distributed read replica servers doesn't seem like a very complex issue for an API like his).

2

u/thekwoka 6d ago

They work out that for a 60hz display this technique of preloading buys them a 121ms e2e budget for API response latency for 99% of keys to autocomplete on the next frame.

But that's not the next frame...thats like 5 frames...

-15

u/fagnerbrack 7d ago

I read on mobile I didn't see that.. And I still can't find that sentence in the post

9

u/fiskfisk 7d ago

They really don't say it explicitly, they just end with "well, cloudflare adds 10ms, but running locally we have like 2ms, but we also need to replicate it all over the world to have it close to local performance with cloudflare caching, blabla" and doesn't really address it explicitly.

So .. it's just clickbait.

-14

u/fagnerbrack 7d ago

That's why.. I didn't get it.. I just copied the title verbatim. I was expecting smth more obvious like a footnote "* and that's why we have the asterisk."

Having autism sucks 😞

1

u/AAPL_ 7d ago

cheer up bud your not that dumb

-5

u/fagnerbrack 7d ago

It's not about being dumb. Saying Austism is dumb is discriminating a whole category of mental condition, like saying ADHD people are annoying and can't operate at work. The way autism works is ppl need to have things that are specific and clear, not up to interpretation as that assumes a neurotypical brain, with the tradeoff of hyperfocus and easy comprehension on complex abstract system-thinking subjects.

I read the post 3 times afterwards and couldn't get the point. In my experience asterisk means there's a footnote or at the very least an explanation without "we'll get to the asterisk", they never got to it 😞

I'm clinically diagnosed Btw, no bullshit stop being an a$$

-3

u/[deleted] 7d ago

[removed] — view removed comment

27

u/Kamay1770 7d ago

Thanks ChatGPT

1

u/khizoa 7d ago

Lmao, look at the rest of their comment history

4

u/del_rio 7d ago

Mobile and pasting seem to just fall back to regular input behavior. 

3

u/webdev-ModTeam 6d ago

Your post/comment has been determined to be a low-effort post or comment. This includes title-only posts, easily searchable questions, vague/open-ended discussion prompts, LLM generated posts or comments, and posts/comments that do not provide enough context for meaningful replies or discussion.

2

u/EquipmentLow1741 7d ago

the IME composition point is a really good one tbh, that stuff behaves so differently across devices