nushell/crates/nu-command/src/viewers
Reilly Wood 22c50185b5
table: Check stream timeout on every item (#7509)
`table` handles slow `ListStream`s in a special way: every 100 items, it
checks whether 1 second has elapsed since the last table page, and if so
it outputs a new page with all the items in its buffer.

**I would like to remove the "every 100 items" condition and always
output whatever we have if a second has elapsed.** I think this will be
a better user experience for very slow streams.

As a motivating example, imagine tailing a log file and doing some
string parsing/projection on each line. The user will be really annoyed
if they have to wait for 100 lines to be written to the log before
seeing new results!

I did some quick performance measurements with Criterion, and the
elapsed-time check takes about 16ns on my machine (Linux, 12900k). I
think the performance impact of checking that for every item will be
negligible.
2022-12-21 14:28:27 -08:00
..
explore.rs Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
griddle.rs Reduced LOC by replacing several instances of Value::Int {}, Value::Float{}, Value::Bool {}, and Value::String {} with Value::int(), Value::float(), Value::boolean() and Value::string() (#7412) 2022-12-09 11:37:51 -05:00
icons.rs replace lazy_static with once_cell (#7502) 2022-12-17 10:30:04 -08:00
mod.rs [MVP][WIP] less like pager (#6984) 2022-12-01 09:32:10 -06:00
table.rs table: Check stream timeout on every item (#7509) 2022-12-21 14:28:27 -08:00