From a3044a5fd8161e54ccfa086c6cb2a2de00f5ee64 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 7 Dec 2015 13:55:09 +0200 Subject: [PATCH] Increased small file size threshold in FSHandler - 4-8Kb files are served faster with smallFileReader --- fshandler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fshandler.go b/fshandler.go index 575efa5..c5a734a 100644 --- a/fshandler.go +++ b/fshandler.go @@ -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