summaryrefslogtreecommitdiff
path: root/Assistant/Threads
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-06-20 21:10:16 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-06-20 22:25:41 -0400
commit1a171303b442351cf2b63038776f856902cce1dd (patch)
tree57fa532de533d111a76b8808253869026aae348e /Assistant/Threads
parenta6914b4761bbedc27a7199a5c05466fdd0edb905 (diff)
assistant: On Linux, the expensive transfer scan is run niced.
This is a compromise. I would like to nice every thread except for the webapp thread, but it's not practical to do so. That would need every thread to run as a bound thread, which could add significant overhead. And any forkIO would escape the nice level.
Diffstat (limited to 'Assistant/Threads')
-rw-r--r--Assistant/Threads/TransferScanner.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Assistant/Threads/TransferScanner.hs b/Assistant/Threads/TransferScanner.hs
index 46695469e..5a6871fdb 100644
--- a/Assistant/Threads/TransferScanner.hs
+++ b/Assistant/Threads/TransferScanner.hs
@@ -24,6 +24,7 @@ import qualified Remote
import qualified Types.Remote as Remote
import Utility.ThreadScheduler
import Utility.NotificationBroadcaster
+import Utility.Batch
import qualified Git.LsFiles as LsFiles
import qualified Backend
import Annex.Content
@@ -114,7 +115,7 @@ failedTransferScan r = do
- since we need to look at the locations of all keys anyway.
-}
expensiveScan :: UrlRenderer -> [Remote] -> Assistant ()
-expensiveScan urlrenderer rs = unless onlyweb $ do
+expensiveScan urlrenderer rs = unless onlyweb $ batch <~> do
debug ["starting scan of", show visiblers]
unwantedrs <- liftAnnex $ S.fromList