Hacker News new | past | comments | ask | show | jobs | submit login

How would performance be a concern for rendering the UI of a terminal app? Surely that happens in less than 0.001% of all cases. And of course no one in their right mind is implementing the core functionality of their app with react state variables. (Right..?)



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.


How many terminal apps do you know of that have 50,000 items with a scroll wheel? This is what I meant by 0.001%.


Any 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, 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.


Since when is the basic pager an exotic terminal app?


A pager doesn’t show 50,000 items at the same time - at least not the ones I use…


I don't see anything in grandparent implying in view at the same time, and that sounds pretty unlikely.


What kind of TUI are you making that requires a scrollable view of 50k items?


Any log viewer.


Fair example, I haven’t built a log viewer but this might be the wrong choice, or maybe there are escape hatches.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: