Hacker News new | ask | show | jobs
by ArthurClemens 4019 days ago
This cannot be solved by the infinite list itself, because by definition it needs to throw out unneeded content (otherwise it would just grow in memory). A search field on top of the list could talk to the server and retrieve the filtered elements.
1 comments

Does this thing actually throw out not-in-view items entirely, and then ask the server for them again when the user scrolls up? That would be surprising. The memory overhead of the out-of-view items, after they are removed from the DOM, is probably pretty small.
You are right, the pages data that is fetched from the server is kept in memory for future rendering, which usually does not cause memory problems. It is up to the user how to implement search, either by searching in-memory, or change the query and reload the list.