From 6d4e57ed5515b40dc7d63dc1101a31c50ab42fa6 Mon Sep 17 00:00:00 2001 From: joeshaw Date: Tue, 23 Aug 2005 15:40:03 +0000 Subject: [PATCH] Set IO priorities to idle in beagle-build-index and beagle-manage-index --- beagled/BuildIndex.cs | 3 +++ beagled/ManageIndex.cs | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/beagled/BuildIndex.cs b/beagled/BuildIndex.cs index 214c0e81..b565deeb 100644 --- a/beagled/BuildIndex.cs +++ b/beagled/BuildIndex.cs @@ -172,6 +172,9 @@ namespace Beagle.Daemon Console.WriteLine ("Index directory not available for construction: {0}", arg_output); Environment.Exit (1); } + + // Set the IO priority to idle so we don't slow down the system + IoPriority.SetIdle (); driver = new LuceneIndexingDriver (arg_output); driver.TextCache = (arg_cache_text) ? new TextCache (arg_output) : null; diff --git a/beagled/ManageIndex.cs b/beagled/ManageIndex.cs index ada38c4e..1c59ed78 100644 --- a/beagled/ManageIndex.cs +++ b/beagled/ManageIndex.cs @@ -191,6 +191,9 @@ namespace Beagle.Daemon Console.WriteLine ("Could not find index to merge: {0}", index_to_merge); Environment.Exit (1); } + + // Set the IO priority to idle so we don't slow down the system + IoPriority.SetIdle (); LuceneQueryingDriver driver_to_merge = new LuceneQueryingDriver (index_to_merge, -1, false); @@ -238,6 +241,9 @@ namespace Beagle.Daemon static void ExecuteOptimize () { + // Set the IO priority to idle so we don't slow down the system + IoPriority.SetIdle (); + Stopwatch watch = new Stopwatch (); watch.Start (); -- 2.11.4.GIT