Lots of improvements. Most notably, removal of memory maps for searching.
Memory maps appear to degrade quite a bit in the presence of multithreading. Also, switch to lock free data structures for synchronization. Give each worker an input and output buffer which require no synchronization.
This commit is contained in:
@@ -28,6 +28,10 @@ impl<W: io::Write> Printer<W> {
|
||||
wln!(&mut self.wtr, "{}", path.as_ref().display());
|
||||
}
|
||||
|
||||
pub fn path_count<P: AsRef<Path>>(&mut self, path: P, count: u64) {
|
||||
wln!(&mut self.wtr, "{}:{}", path.as_ref().display(), count);
|
||||
}
|
||||
|
||||
pub fn count(&mut self, count: u64) {
|
||||
wln!(&mut self.wtr, "{}", count);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user