From cf852e67aa4f3dde55f2c87931f960220aa5c3d2 Mon Sep 17 00:00:00 2001 From: Leynos Date: Tue, 22 Jul 2025 01:21:44 +0100 Subject: [PATCH 1/3] Update docs for CLI and concurrency --- README.md | 8 ++++---- src/main.rs | 13 +++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 24ad540f..27067c86 100644 --- a/README.md +++ b/README.md @@ -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, 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. ### Example: Table Reflowing diff --git a/src/main.rs b/src/main.rs index d7dee4d8..9e75ce11 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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 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. use std::{ borrow::Cow, From bdd6fbf52032e888b7c4381025c00fe97be4a7a2 Mon Sep 17 00:00:00 2001 From: Leynos Date: Thu, 24 Jul 2025 07:24:38 +0100 Subject: [PATCH 2/3] Refine concurrency docs --- README.md | 8 ++++---- src/main.rs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 27067c86..356dc845 100644 --- a/README.md +++ b/README.md @@ -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 you supply multiple file paths, `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 diff --git a/src/main.rs b/src/main.rs index 9e75ce11..0948ed81 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,10 +2,10 @@ //! //! 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 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. +//! 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, From ba5c4db2a873cb7159ba4990aed8f63b1a24066b Mon Sep 17 00:00:00 2001 From: Leynos Date: Thu, 24 Jul 2025 08:10:53 +0100 Subject: [PATCH 3/3] Clarify concurrency note --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 356dc845..00d3fde4 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ mdtablefix [--wrap] [--renumber] [--breaks] [--ellipsis] [--fences] [--footnotes ## Concurrency -When you supply multiple file paths, `mdtablefix` processes them in parallel +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.