Commit graph

1 commit

Author SHA1 Message Date
Joel Low
ba0e1749ec
perf(zfs): optimise pool listing for pools with many datasets (#440)
Restricting the `zfs list` command to depth 1 saves a lot of time for
pools with many datasets/zvols.

In my case, before:
```
$ time zfs list -s name -o name,guid,available -H -p >/dev/null
real    0m3.853s
user    0m0.171s
sys     0m3.539s
```

After:
```
$ time zfs list -d 1 -s name -o name,guid,available -H -p >/dev/null
real    0m0.027s
user    0m0.002s
sys     0m0.026s
```

Signed-off-by: Joel Low <joel@joelsplace.sg>
2023-05-29 09:17:28 +05:30