Skip to content

Commit

Permalink
Shorter readme page.
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegrosjean committed Feb 9, 2019
1 parent b3ac65c commit 0ee3b3c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 34 deletions.
43 changes: 9 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
jwalk
=======

**Note** This is my first public crate. Looking testing and feedback (Code, API,
Documentation) before posting 1.0.

Fast recursive directory walk.

- Walk is performed in parallel using rayon
Expand All @@ -15,19 +12,17 @@ Fast recursive directory walk.
[![Documentation](https://docs.rs/jwalk/badge.svg)](https://docs.rs/jwalk)
[![License](https://img.shields.io/crates/l/jwalk.svg)](https://github.com/rust-lang-nursery/jwalk.rs#license)

### Documentation

[docs.rs/jwalk](https://docs.rs/jwalk)

### Usage

Add `jwalk` to your project's `Cargo.toml`:
Add this to your `Cargo.toml`:

```toml
[dependencies]
jwalk = "0.1.0"
```

See documentation next: [docs.rs/jwalk](https://docs.rs/jwalk).

### Example

Recursively iterate over the "foo" directory sorting by name:
Expand All @@ -48,16 +43,10 @@ parallelism of `ignore` with `walkdir`s streaming iterator API.

### Why use this crate?

Speed and flexibility.

This crate is particularly fast when you want streamed sorted results. In
this case it's much faster then `walkdir` and has much better latency then
`ignore`.

This crate's `process_entries` callback allows you to arbitrarily
sort/filter/skip each directories entries before they are yielded. This
processing happens in the thread pool and effects the directory traversal.
It can be much faster then post processing the yielded entries.
This crate is particularly fast when you want streamed sorted results. About 4x
`walkdir` speed for sorted results with metadata in my tests. Also this crate's
`process_entries` callback allows you to arbitrarily sort/filter/skip entries
before they are yielded.

### Why not use this crate?

Expand All @@ -67,19 +56,5 @@ implementation.

### Benchmarks

Time to walk linux's source tree:

| Crate | Options | Time |
|---------|--------------------------------|-----------|
| jwalk | unsorted, parallel | 60.811 ms |
| jwalk | sorted, parallel | 61.445 ms |
| jwalk | sorted, parallel, metadata | 100.95 ms |
| jwalk | unsorted, parallel (2 threads) | 99.998 ms |
| jwalk | unsorted, serial | 168.68 ms |
| jwalk | sorted, parallel, first 100 | 9.9794 ms |
| ignore | unsorted, parallel | 74.251 ms |
| ignore | sorted, parallel | 99.336 ms |
| ignore | sorted, parallel, metadata | 134.26 ms |
| walkdir | unsorted | 162.09 ms |
| walkdir | sorted | 200.09 ms |
| walkdir | sorted, metadata | 422.74 ms |
[Benchmarks](https://github.com/jessegrosjean/jwalk/blob/master/benches/benchmarks.md)
comparing this crate with `jwalk` and `ignore`.
16 changes: 16 additions & 0 deletions benches/benchmarks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Time to walk linux's source tree:

| Crate | Options | Time |
|---------|--------------------------------|-----------|
| jwalk | unsorted, parallel | 60.811 ms |
| jwalk | sorted, parallel | 61.445 ms |
| jwalk | sorted, parallel, metadata | 100.95 ms |
| jwalk | unsorted, parallel (2 threads) | 99.998 ms |
| jwalk | unsorted, serial | 168.68 ms |
| jwalk | sorted, parallel, first 100 | 9.9794 ms |
| ignore | unsorted, parallel | 74.251 ms |
| ignore | sorted, parallel | 99.336 ms |
| ignore | sorted, parallel, metadata | 134.26 ms |
| walkdir | unsorted | 162.09 ms |
| walkdir | sorted | 200.09 ms |
| walkdir | sorted, metadata | 422.74 ms |

0 comments on commit 0ee3b3c

Please sign in to comment.