packages feed

yesod-static-streamly 0.1.3.3 → 0.1.3.4

raw patch · 3 files changed

+11/−3 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -33,3 +33,7 @@ ## 0.1.3.3 -- 2023-07-07  * Rework of the sinkHashStreamly and hashFileStreamly functions in Yesod.Static.Streamly.Internal.++## 0.1.3.4 -- 2023-07-08++* Modified hashFileStreamly to set unlimited buffer, threading and eager scheduling for parEval function.
src/Yesod/Static/Streamly/Internal.hs view
@@ -66,6 +66,7 @@ import qualified Streamly.Data.Fold as Fold import Streamly.External.ByteString as StreamlyByteString import Streamly.FileSystem.Handle as StreamlyFile (chunkReader)+import Streamly.Internal.Data.Stream.Concurrent.Channel (defaultConfig) import Streamly.Internal.Data.Stream.MkType (MonadThrow) import System.Directory (doesDirectoryExist,doesFileExist,getDirectoryContents) import System.IO (openFile,IOMode(ReadMode))@@ -244,8 +245,11 @@                  -> m (Crypto.Hash.Digest hash) hashFileStreamly fp = do   shandle <- liftIO $ openFile fp ReadMode-  let lazyfile = S.unfold StreamlyFile.chunkReader shandle-  let lazyfilef = StreamlyPrelude.parEval id+  let lazyfile  = S.unfold StreamlyFile.chunkReader shandle+  let parconfig = do let parconfigmaxthreads              = maxThreads (-1) defaultConfig+                     let parconfigmaxbufferandmaxthreads  = maxBuffer  (-1) parconfigmaxthreads+                     eager True parconfigmaxbufferandmaxthreads+  let lazyfilef = StreamlyPrelude.parEval (const . id $ parconfig)                                           (fmap StreamlyByteString.fromArray lazyfile)   lazyfileff <- S.fold (Fold.foldl' (<>) mempty) lazyfilef   sinkHashStreamly lazyfileff
yesod-static-streamly.cabal view
@@ -20,7 +20,7 @@ -- PVP summary:     +-+------- breaking API changes --                  | | +----- non-breaking API additions --                  | | | +--- code changes with no API change-version:            0.1.3.3+version:            0.1.3.4  -- A short (one-line) description of the package. synopsis:           A streamly-based library providing performance-focused alternatives for functionality found in yesod-static.