summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-02-18 13:45:35 +0100
committerMatthias Beyer <mail@beyermatthias.de>2019-02-18 16:02:49 +0100
commit6681f9fcfd520c67af6ac719647e4c0b36b6f7f8 (patch)
treeb7e836ef93425752709b343758326db57fef9705
parentb5fe48b5644dfd83a55af51d7c8d8e9b799fdf74 (diff)
Remove unused code
Because the store is more efficient when reading and writing entries to disk, we do not need to flush the cache anymore. Hence, remove the flushing. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--bin/core/imag-diagnostics/src/main.rs13
1 files changed, 0 insertions, 13 deletions
diff --git a/bin/core/imag-diagnostics/src/main.rs b/bin/core/imag-diagnostics/src/main.rs
index 4e978d55..4414c1b8 100644
--- a/bin/core/imag-diagnostics/src/main.rs
+++ b/bin/core/imag-diagnostics/src/main.rs
@@ -126,7 +126,6 @@ fn main() {
"Print diagnostics about imag and the imag store",
ui::build_ui);
- let mut entries_counter = 0;
let template = get_config(&rt, "rt.progressbar_style");
let tick_chars = get_config(&rt, "rt.progressticker_chars");
@@ -154,18 +153,6 @@ fn main() {
let diag = Diagnostic::for_entry(&e);
debug!("Diagnostic for '{:?}' = {:?}", e.get_location(), diag);
drop(e);
-
- entries_counter += 1;
-
- // because we're effectively reading _all_ store entries here.
- //
- // The store has an API for it, but the cache size calculation is O(n) and we can do
- // better by simply flushing the cache each 100 entries
- if entries_counter > 100 {
- let _ = rt.store().flush_cache().map_err_trace_exit_unwrap();
- entries_counter = 0;
- }
-
diag
})
.collect::<Result<Vec<_>>>()