Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ mdtablefix [--wrap] [--renumber] [--breaks] [--ellipsis] [--fences] [--footnotes

## Concurrency

When multiple file paths are supplied the tool processes them in parallel using
the [`rayon`](https://docs.rs/rayon) crate. Results are buffered so they can be
printed in the original order. This coordination uses extra memory and can
outweigh the speed gains when each file is small.
When multiple file paths are supplied, `mdtablefix` processes them in parallel
using the [`rayon`](https://docs.rs/rayon) crate. The CLI buffers each result,
so it can print them in the original order. This buffering uses extra memory.
It might outweigh the speed gains for small files.

### Example: Table Reflowing

Expand Down
13 changes: 7 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
//! Command-line interface for the mdtablefix tool.
//! Command-line interface for the `mdtablefix` tool.
//!
//! This module provides the main entry point and CLI parsing for fixing
//! markdown table formatting. It processes multiple files concurrently using
//! Rayon. Each worker buffers its output so lines can be printed in the same
//! order the paths were supplied. For many small files this coordination cost
//! may outweigh the benefits of parallelism.
//! This module provides the main entry point for the command-line parsing in
//! the `mdtablefix` crate. It fixes Markdown table formatting and processes
//! multiple files concurrently using the `rayon` crate. Each worker buffers
//! its output so lines can be printed in the same order the paths were
//! supplied. For many small files, this coordination cost may outweigh the
//! benefits of parallelism.

use std::{
borrow::Cow,
Expand Down