Add TODOs for performance aspects
Signed-off-by: Olivier <olivier@librepush.net>
This commit is contained in:
parent
b410114523
commit
9d06016d06
|
@ -129,6 +129,8 @@ pub fn scan(root: &Path, ignores: &Vec<String>) -> eyre::Result<PatriciaMap<Scan
|
||||||
.build()
|
.build()
|
||||||
.context("failed to create overrides with ignore entries")?,
|
.context("failed to create overrides with ignore entries")?,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// TODO(performance): We could use `WalkParallel` if we restructure this code.
|
||||||
let walker = walker.build();
|
let walker = walker.build();
|
||||||
|
|
||||||
for entry in walker {
|
for entry in walker {
|
||||||
|
@ -195,6 +197,7 @@ fn scan_one_no_recurse(path: &Path, metadata: Metadata) -> eyre::Result<Option<S
|
||||||
size: metadata.size(),
|
size: metadata.size(),
|
||||||
}))
|
}))
|
||||||
} else if filetype.is_dir() {
|
} else if filetype.is_dir() {
|
||||||
|
// TODO(perforance): this call is very likely wasteful
|
||||||
let dir_read = path.read_dir();
|
let dir_read = path.read_dir();
|
||||||
|
|
||||||
if let Err(e) = &dir_read {
|
if let Err(e) = &dir_read {
|
||||||
|
|
Loading…
Reference in New Issue