nushell/crates/nu-command/src
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
..
bits Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
bytes Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
charting Remove unnecessary echo uses from examples (#7500) 2022-12-16 11:51:00 -05:00
conversions Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
core_commands Initial support for parse-time constants (#7436) 2022-12-22 00:21:03 +02:00
database Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
dataframe 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
date Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
deprecated Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
env Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
experimental Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
filesystem Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
filters Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
formats Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
generators remove example missed from an earlier refactor (#7419) 2022-12-09 20:04:14 -06:00
hash Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
math Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
misc Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
network Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
path Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
platform Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
random Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
shells Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
strings Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
system Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
viewers table: Check stream timeout on every item (#7509) 2022-12-21 14:28:27 -08:00
default_context.rs Initial support for parse-time constants (#7436) 2022-12-22 00:21:03 +02:00
example_test.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
input_handler.rs Add helper method to check whether ctrl+c was pressed, adopt it (#7482) 2022-12-15 09:39:24 -08:00
lib.rs Feature cleanup (#7182) 2022-11-22 16:58:11 -08:00
sort_utils.rs Fix sort-by, path join and size error arrows (#7199) 2022-11-23 19:22:23 +13:00