pub enum BuildMethod {
SerialAsync,
ParallelRayon,
ParallelThreadPool,
}Expand description
Represents the method of building the tree. Usually serial-async and parallel-rayon are the most performant. Other methods are added just for benchmarking purposes.
Variants§
SerialAsync
Every file path in tree is read sequentially with async await on read call.
This is single threaded with a block_on future executor.
ParallelRayon
Every child path for one directory is read parallelly using rayon’s par_bridge on iterator.
This is currently giving the best time performance.
ParallelThreadPool
Every path is queued in a job queue. A pool of n concurrent threads process each job concurrently. This is currently giving the worst time performance considering that file info read is not a CPU bound process and hence would be causing a lot of context switchingamong threads.
Trait Implementations§
Source§impl Debug for BuildMethod
impl Debug for BuildMethod
Auto Trait Implementations§
impl Freeze for BuildMethod
impl RefUnwindSafe for BuildMethod
impl Send for BuildMethod
impl Sync for BuildMethod
impl Unpin for BuildMethod
impl UnwindSafe for BuildMethod
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more