2 ms·
As a user, I often do something akin to a binary search when direct addressing is available. It can be annoying when it isn’t available, or when there’s not at
by layer8 5y ago
As a user, I often do something akin to a binary search when direct addressing is available. It can be annoying when it isn’t available, or when there’s not at least a shortcut to skip 10 or 50 pages, or to jump to the end of the search.
- ezekg 5y agoBut you’re again, not actually using a page number here. What you really need is a different cursor, e.g. a cursor on created_at, to help perform the binary search more efficiently, right? A cursor doesn’t necessarily have to be an ID.
- layer8 5y agoWell, what I do is to jump to a page at a certain ratio between two pages. Of course the UI could allow entering that ratio instead of selecting a numbered page, but I don’t quite see the benefit in that. The internal navigation can in principle be implemented either way (cursor or offset). One requirement is for the size of the result set to be known, at least as an approximation (e.g. like Google does).
- boxed 5y agoI see people use this method all the time and I use it myself sometimes but it's 100% of the time a hack around the system not having filtering as far as I can tell.