Closed the-man-with-a-golden-mind closed 3 months ago
Try (logger-current-level-set! default-logger 'warn)
.
It probably makes sense to initialize the log level from an environment variable.
Why logging is so slow? Maybe we can make it async?
Logging uses custom date formatting written in Scheme and writes all mime headers as an sexp (using the expensive and generalized write
).
For now added a --quiet option to disable this. We can also maybe play around with not logging the full headers.
Just by commenting that one line I can jump with http-server performance from 130-160 requests / second to 612 request / second. https://github.com/ashinn/chibi-scheme/blob/67fdb283b667c8f340a5dc7259eaf44825bc90bc/lib/chibi/net/http-server.scm#L57