Diff

net/http/server.lua @ 7541:1d3f9da189b5

net.http.server: Set blocksize for serving data from FDs to 64k (sweet spot of efficiency according to a recent study)
author Kim Alvefur <zash@zash.se>
date Mon, 08 Aug 2016 16:07:46 +0200
parent 7489:d32406f27efd
child 7581:01d0d466d7be
line wrap: on
line diff
--- a/net/http/server.lua	Sun Aug 07 20:51:34 2016 +0200
+++ b/net/http/server.lua	Mon Aug 08 16:07:46 2016 +0200
@@ -13,7 +13,7 @@
 local tostring = tostring;
 local cache = require "util.cache";
 local codes = require "net.http.codes";
-local blocksize = require "socket".BLOCKSIZE or 2048;
+local blocksize = 2^16;
 
 local _M = {};