diff options
author | rabite <rabite@posteo.de> | 2020-01-22 15:28:55 +0100 |
---|---|---|
committer | rabite <rabite@posteo.de> | 2020-01-22 15:28:55 +0100 |
commit | 325f5a5ab3f44457263d7d5c04e488faea0d369e (patch) | |
tree | 01908a720a5190cf80c55647f00dfb94c6208d04 | |
parent | 8c23d058ade48d9af84a67a1c2225f8309e4827c (diff) |
remove limit on number of files updated at once
Since calculating the hash tables is the costliest part of updating a
directory it makes little sense to limit the number of files being
processed at once. That only means the hash tables have to be created
more often and updates take much more time in total. Since it's all
done in an asynchronous worker thread anyway it makes more sense to
process as much as possible in one go, even if it takes a second
longer.
-rw-r--r-- | src/files.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/files.rs b/src/files.rs index bafffc9..ccdaabf 100644 --- a/src/files.rs +++ b/src/files.rs @@ -547,13 +547,8 @@ impl Files { render_fn: impl Fn(&File) -> String + Send + 'static) -> HResult<()> { let pending = self.pending_events.read()?.len(); - if pending > 0 { - let pending = if pending >= 1000 { - 1000 - } else { - pending - }; + if pending > 0 { let events = self.pending_events .write()? .drain(0..pending) |