Menu

Why Your Search Box Lags: Big O in the Real World
📰

Why Your Search Box Lags: Big O in the Real World

#hackernoon#technology#list#selected#items
Long article (1143 words) — no AI summary yet.
Reading 0:00
15s threshold

You start typing into a filter and the letters stop arriving one at a time. They come in clumps. You type three letters and see nothing, then all three appear at once. The list is only a few tens of thousands of items. The machine is fine. The code looks fine.

It almost always is fine, except for one line.

That is where Big O lives in interface work. Not in a textbook chart of curves, but in a search box that falls behind your fingers once the list gets long. The chart at labs.sammii.dev/charts/big-o opens with exactly that, measured in your browser, and only then draws the classes to scale.

The one line

The demo is a list of generated items, each a pair of words and a number: "amber amber 0", "basil heath 1" and so on. Half of them are selected. Each keystroke filters the list and, for every item that matches, checks whether it is selected, so the row can be drawn highlighted.

There are two fields side by side. They do the same job on the same list with the same render.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.