dduan / tre

Tree command, improved.
MIT License
732 stars 15 forks source link

Man, just use `lsd --tree` instead! #135

Closed vishalpaudel closed 6 months ago

vishalpaudel commented 8 months ago

Nice project, but there is already a better (I think) project called lsd in Rust-lang:

https://github.com/lsd-rs/lsd

With much better options for icons and coloring.

So, new-comers, use lsd --tree instead!

@dduan

Please mention this in the main README.md no?

An example screenshot:

Screenshot 2023-11-05 at 1 36 18 PM

GotaLoveFiraCode commented 6 months ago

Yes! lsd is much better than tre! Other than the performance, of course…

Hyperfine (command):

$ sudo hyperfine "lsd --tree /home/<me>/Music" "tree /home/<me>/Music" "tre /home/<me>/Music" -i -p "sync && echo 3 | tee /proc/sys/vm/drop_caches"

Output of fd . /home/<me>/Music | wc -l: 12 530

Output of hyperfine:

Benchmark 1: lsd --tree /home/ltr/Music
  Time (mean ± σ):     673.6 ms ±  41.0 ms    [User: 149.6 ms, System: 414.8 ms]
  Range (min … max):   640.8 ms … 765.3 ms    10 runs

Benchmark 2: tree /home/ltr/Music
  Time (mean ± σ):     237.3 ms ±  11.8 ms    [User: 31.9 ms, System: 113.9 ms]
  Range (min … max):   225.4 ms … 254.7 ms    10 runs

Benchmark 3: tre /home/ltr/Music
  Time (mean ± σ):       3.5 ms ±   0.5 ms    [User: 0.3 ms, System: 0.9 ms]
  Range (min … max):     1.5 ms …   4.0 ms    45 runs

Summary
  tre /home/ltr/Music ran
   67.69 ± 9.34 times faster than tree /home/ltr/Music
  192.12 ± 27.36 times faster than lsd --tree /home/ltr/Music

I like lsd, but despite it being written in rust, it is extremely slow. I would much rather use eza and tre.

vishalpaudel commented 6 months ago

Point noted, but just thinking...

  1. lsd has colouring and UTF8 icons.
  2. For HUGE directories would you want a visual tree at all instead of fd, find etc.?
  3. lsd solves my usecase: cross platform, easy interface, icons by default, fast enough for ls and tree.

So, I don't understand, of course:

  1. Maybe tre have plans for icons-support?
  2. I think the editor integration is cool but..