Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difference with tree #11

Open
donbex opened this issue Jul 27, 2020 · 2 comments
Open

Difference with tree #11

donbex opened this issue Jul 27, 2020 · 2 comments

Comments

@donbex
Copy link

donbex commented Jul 27, 2020

It would be interesting to include in the README any differences between as-tree and tree -C --fromfile ., since tree is already packaged by many (most?) distributions. The only one immediately apparent to me is a slight performance gain:

$ wc -l ls.list
84758 ls.list

$ hyperfine --warmup 3 'cat ls.list | tree -C --fromfile .' 'cat ls.list | as-tree'
Benchmark #1: cat ls.list | tree -C --fromfile .
  Time (mean ± σ):     571.0 ms ±   5.6 ms    [User: 571.4 ms, System: 32.9 ms]
  Range (min … max):   562.2 ms … 580.9 ms    10 runs

Benchmark #2: cat ls.list | as-tree
  Time (mean ± σ):     454.3 ms ±   7.8 ms    [User: 349.1 ms, System: 131.4 ms]
  Range (min … max):   443.1 ms … 471.9 ms    10 runs

Summary
  'cat ls.list | as-tree' ran
    1.26 ± 0.02 times faster than 'cat ls.list | tree -C --fromfile .'
@justsh
Copy link

justsh commented Aug 26, 2020

tree --fromfile does require tree v1.8.0 for what it's worth; some LTS distros still have older versions.
and while the manpage doesn't say so, the changes file stated the option is/was experimental.

http://mama.indstate.edu/users/ice/tree/changes.html

Version 1.8.0 (11/16/2018)

Added an experimental --fromfile option (suggested by several people.) This may eventually be replaced or supplimented by a --fromjson option.

@donbex donbex mentioned this issue Oct 25, 2020
@desbma
Copy link

desbma commented Aug 8, 2021

There are also similar projects:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants