J0sephDavis / ftxuiFileReader

CLI file viewer using FTXUI.
4 stars 1 forks source link

Excess memory usage with large files #4

Open OutXiao opened 1 year ago

OutXiao commented 1 year ago

Good Job! But the application based on ftxui has performance problem when open a huge text file.

J0sephDavis commented 1 year ago

Definitely something I will have to look into. I am currently saving the entire file as a vector of strings, or possibly a list of ftxui elements containing the strings, and displaying a range of the strings on screen. Regardless of how it is currently implemented, look into changing how this is currently done.

note to self, Something like setting a DEFINE WINDOW_LINES 100 and once we have iterated to the edge of this window we go and fetch more lines, rather than fetching upfront.