mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-26 17:46:34 +03:00
FS: reduced miminum compression ratio for triggering response compression. This should reduce CPU usage for files with low compression ratio
This commit is contained in:
@@ -822,7 +822,7 @@ func (h *fsHandler) createDirIndex(base *URI, dirPath string, mustCompress bool)
|
||||
return ff, nil
|
||||
}
|
||||
|
||||
const fsMinCompressRatio = 0.9
|
||||
const fsMinCompressRatio = 0.8
|
||||
|
||||
func (h *fsHandler) compressAndOpenFSFile(filePath string) (*fsFile, error) {
|
||||
f, err := os.Open(filePath)
|
||||
|
||||
Reference in New Issue
Block a user