Files
nushell/crates/nu-table/src
Maxim Zhiburt 71d78b41c4 nu-table: optimize table creation and width functions (#15900)
> Further tests are welcomed.

It was already implemented that we precalculate widths, but nothing
stops to do heights as well.
Because before all the calculus were wasted (literally).

It affects `table` and `table --expand`.
The only case when it does not work (even makes things slightly less
optimal in case of `table` when `truncation` is used)

Sadly my tests are not showing the clear benefit.
I have no idea why I was expecting something 😞 
But it must be there :)

Running `scope commands` + `$env.CMD_DURATION_MS`:

```log
# patch (release)
2355 2462 2210 2356 2303

# main (release)
2375 2240 2202 2297 2385
```

PS: as once mentioned all this stuff ought to be moved out `nu-table`

---------

Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
2025-07-06 12:56:42 -05:00
..
2025-06-05 06:45:05 -05:00
2025-05-13 16:49:30 +02:00