Agility Kata “CSV Viewer IV”

The CSV viewer shall now display huge CSV files, e.g. 3 times the amount of GB of your computer's memory. Yes, the CSV viewer should be able to handle billions of records, or at least many more records than would fit in memory.

Nevertheless, the first page should be displayed immediately when the application is started. Of course, the maximum number of pages cannot yet be determined then. As long as [1] this is the case, simply put a "?" after the number of pages:

No.|Name |Age|City    |
1. |Peter|42 |New York|
2. |Paul |57 |London  |
3. |Mary |35 |Munich  |
Page 1 of 3?
F)irst page, P)revious page, N)ext page, L)ast page, J)ump to page, S)ort, E)xit

Sorting the data shall of course still be possible. Not a simple task with huge amounts of data, but solvable 😉.

[1] This implies that background processing is taking place. The file must be processed further after the first page is displayed, because the user wants to know the exact number of pages and jump immediately to any page (which has already been processed). In terms of usability, waiting until the user has entered a page number to jump to before starting to read from the file is not an option.