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.
This commit is contained in:
rabite 2020-01-22 15:28:55 +01:00
parent 8c23d058ad
commit 325f5a5ab3
1 changed files with 1 additions and 6 deletions

View File

@ -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)