libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] Improving response header build performance


From: Ariel Cohen
Subject: [libmicrohttpd] Improving response header build performance
Date: Tue, 6 Oct 2020 14:56:56 -0700 (PDT)

Hi,

I noticed that adding response headers is expensive. One reason is that many 
instructions are executed for the snprintf() calls which are invoked when 
building response headers (build_header_response()).

There is an sprintf accelerator called qrintf which rewrites invocations of 
sprinf/snprintf to optimized forms. This is done by preprocessing the source 
files using a filter program. See:

https://github.com/h2o/qrintf

This is provided under the MIT license, and I believe it is used in the H2O 
HTTP server/library.

Using this preprocessor on libmicrohttpd results in a significant reduction in 
the instruction count for adding response headers during runtime.

My question is whether this is something that could be considered for use by 
libmicrohttpd in a future release. It would be helpful to improve the 
performance of adding response headers.

Thanks,

Ariel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]