mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-14 15:56:44 +03:00
Increased small file size threshold in FSHandler - 4-8Kb files are served faster with smallFileReader
This commit is contained in:
+1
-1
@@ -124,7 +124,7 @@ func (ff *fsFile) smallFileReader() io.Reader {
|
||||
return r
|
||||
}
|
||||
|
||||
const maxSmallFileSize = 4096
|
||||
const maxSmallFileSize = 2*4096
|
||||
|
||||
func (ff *fsFile) isBig() bool {
|
||||
return ff.contentLength > maxSmallFileSize && len(ff.dirIndex) == 0
|
||||
|
||||
Reference in New Issue
Block a user