Minor performance improvements
This commit is contained in:
1 parent
96454631ea
commit
53e6a66c9e
6 files changed
+38
-20
No files matched your search
+3
-1
@@ -29,6 +29,7 @@ import UnliftIO.Concurrent (threadDelay)
|
||||
import UnliftIO.Exception (displayException, isAsyncException)
|
||||
import UnliftIO.IORef (IORef, newIORef, writeIORef)
|
||||
import Wallabag
|
||||
import Pipes.Concurrent (performGC)
|
||||
|
||||
data Options
|
||||
= Quick {verbose :: Bool}
|
||||
@@ -66,11 +67,12 @@ run sev scan = initialS Nothing sev $ \s -> do
|
||||
runM s $ runScan scan
|
||||
|
||||
runScan :: Scan -> M ()
|
||||
runScan scan =
|
||||
runScan scan = do
|
||||
Pipes.runEffect $
|
||||
Pipes.for
|
||||
(sourceEntries scan >-> markdownEntry >-> processableEntries)
|
||||
(lift . doWork)
|
||||
liftIO performGC
|
||||
|
||||
runDaemon :: Int -> FilePath -> K.Severity -> IO ()
|
||||
runDaemon diagnosticsPort credsPath sev = initialS (Just credsPath) sev $ \s -> runM s $ do
|
||||
|
||||
Reference in new issue
Block a user