Skip to content

Commit e3d95fd

Browse files
committed
add warning about par_render
1 parent f48e942 commit e3d95fd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/bytecode.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ impl<
7575

7676
/// Renders a template across multiple items in parallel using Rayon with
7777
/// convenient internally-managed buffers, which requires a mutable reference to self.
78+
///
79+
/// NOTE: This function makes serious trade-offs to enable the _maximum_ throughput.
80+
/// It is far less efficient, and builds up a single buffer containing all results
81+
/// prior to writing this buffer into the output, so it can consume much more memory,
82+
/// and the latency to first-write is also significantly higher.
83+
///
84+
/// Only use if total throughput is the sole concern.
7885
#[cfg(feature = "rayon")]
7986
pub fn par_render<'b, RunnerItem>(
8087
&mut self,

0 commit comments

Comments
 (0)