10 ms·
Haven’t used this library, but the answer is the same as it is for real React apps. How does this application perform if I have a scrollable view with 50,000 it
by CGamesPlay 2y ago
Haven’t used this library, but the answer is the same as it is for real React apps. How does this application perform if I have a scrollable view with 50,000 items in it and I press the down arrow? This kind of thing is why React can be the cause of bad performance.
- johnfn 2y agoHow many terminal apps do you know of that have 50,000 items with a scroll wheel? This is what I meant by 0.001%.
- yencabulator 2y agoSince when is the basic pager an exotic terminal app?
- johnfn 2y agoA pager doesn’t show 50,000 items at the same time - at least not the ones I use…
- yencabulator 2y agoI don't see anything in grandparent implying in view at the same time, and that sounds pretty unlikely.
- CGamesPlay 2y agoAny viewer of data that has 50,000 elements in it has this many items with a scroll wheel. It doesn't matter if it's on the screen at the same time, this is the kind of thing that the UI is supposed to be abstracting away from you; you just describe the UI and the renderer makes it appear on the screen. Example apps (not built with Ink, just some that fit into this category): less, https://fx.wtf https://fx.wtf, sqlite... And this is why React apps end up with bad performance by default. Doesn't crop up in simple tests and light usage, but the bad scaling will catch up with you when you deploy to production.
- mrbombastic 2y agoWhat kind of TUI are you making that requires a scrollable view of 50k items?
- mike_hearn 2y agoAny log viewer.
- mrbombastic 2y agoFair example, I haven’t built a log viewer but this might be the wrong choice, or maybe there are escape hatches.