Copyright | (c) Matthew Mosior 2023 |
---|---|
License | BSD-style |
Maintainer | mattm.github@gmail.com |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Streamly-based alternative functionality for Yesod.Static.
This library utilizes Streamly's superb performance characteristics to replace some of Yesod's functionality with streamly-based functionality.
If you have large files to cache within your static directory, you may very well need to increase you file descriptor limit in order to utilize the functionality this library provides properly.
Synopsis
- staticStreamly :: FilePath -> Int -> IO Static
- staticDevelStreamly :: FilePath -> Int -> IO Static
- combineStylesheetsStreamly' :: Bool -> CombineSettingsStreamly -> Name -> [Route Static] -> Int -> Q Exp
- combineScriptsStreamly' :: Bool -> CombineSettingsStreamly -> Name -> [Route Static] -> Int -> Q Exp
- staticFilesStreamly :: FilePath -> Int -> Q [Dec]
- staticFilesListStreamly :: FilePath -> [FilePath] -> Int -> Q [Dec]
- staticFilesMapStreamly :: FilePath -> Map FilePath FilePath -> Int -> Q [Dec]
- staticFilesMergeMapStreamly :: FilePath -> Map FilePath FilePath -> Int -> Q [Dec]
- publicFilesStreamly :: FilePath -> Int -> Q [Dec]
Yesod.Static Replacement functions - Smart constructor
:: FilePath | file path of static directory |
-> Int | buffer size (0.25 - 0.50 x your L2 cache seems to be best.) |
-> IO Static |
A more performant replacement of static found in Yesod.Static.
:: FilePath | file path of static directory |
-> Int | buffer size (0.25 - 0.50 x your L2 cache seems to be best.) |
-> IO Static |
A more performant replacement of staticDevel found in Yesod.Static.
Yesod.Static Replacement functions - Combining CSS/JS
combineStylesheetsStreamly' Source #
:: Bool | development? if so, perform no combining |
-> CombineSettingsStreamly | |
-> Name | Static route constructor name, e.g. 'StaticR |
-> [Route Static] | files to combine |
-> Int | buffer size (0.25 - 0.50 x your L2 cache seems to be best.) |
-> Q Exp |
A more performant replacement of combineStylesheets' found in Yesod.Static.
combineScriptsStreamly' Source #
:: Bool | development? if so, perform no combining |
-> CombineSettingsStreamly | |
-> Name | Static route constructor name, e.g. 'StaticR |
-> [Route Static] | files to combine |
-> Int | buffer size (0.25 - 0.50 x your L2 cache seems to be best.) |
-> Q Exp |
A more performant replacement of combineScripts' found in Yesod.Static.
Yesod.Static Replacement functions - Template Haskell helpers
:: FilePath | file path of static directory |
-> Int | buffer size (0.25 - 0.50 x your L2 cache seems to be best.) |
-> Q [Dec] |
A more performant replacement of staticFiles found in Yesod.Static.
staticFilesListStreamly Source #
:: FilePath | file path of static directory |
-> [FilePath] | |
-> Int | buffer size (0.25 - 0.50 x your L2 cache seems to be best.) |
-> Q [Dec] |
A more performant replacement of staticFilesList found in Yesod.Static.
staticFilesMapStreamly Source #
:: FilePath | file path of static directory |
-> Map FilePath FilePath | |
-> Int | buffer size (0.25 - 0.50 x your L2 cache seems to be best.) |
-> Q [Dec] |
A more performant replacement of staticFilesMap found in Yesod.Static.
staticFilesMergeMapStreamly Source #
:: FilePath | file path of static directory |
-> Map FilePath FilePath | |
-> Int | buffer size (0.25 - 0.50 x your L2 cache seems to be best.) |
-> Q [Dec] |
A more performant replacement of staticFilesMergeMap found in Yesod.Static.
:: FilePath | file path of static directory |
-> Int | buffer size (0.25 - 0.50 x your L2 cache seems to be best.) |
-> Q [Dec] |
A more performant replacement of publicFiles found in Yesod.Static.