|
Revision tags: lighttpd-1.4.69, lighttpd-1.4.68 |
|
| #
5e14db43 |
| 10-Dec-2022 |
Glenn Strauss <[email protected]> |
[multiple] employ ck_calloc, ck_malloc shared code
employ ck_calloc(), ck_malloc() shared code to slightly reduce code size (centralize the ck_assert() to check that memory allocation succeeded)
|
| #
b82d7b8a |
| 06-Dec-2022 |
Glenn Strauss <[email protected]> |
[multiple] mark mod_*_plugin_init() funcs cold
|
|
Revision tags: lighttpd-1.4.67, lighttpd-1.4.66, lighttpd-1.4.65, lighttpd-1.4.64, lighttpd-1.4.63, lighttpd-1.4.62 |
|
| #
670b3a39 |
| 22-Nov-2021 |
Glenn Strauss <[email protected]> |
[core] allocate one fewer cond_match_t, if needed
allocate one fewer cond_match_t in r->cond_match_data, if any are needed
|
| #
6d47d4c6 |
| 20-Nov-2021 |
Glenn Strauss <[email protected]> |
[core] use stack w/ pcre_exec unless save captures
use stack w/ pcre_exec unless saving captures from config conditions
reduce memory allocations per request where lighttpd.conf does not contain ur
[core] use stack w/ pcre_exec unless save captures
use stack w/ pcre_exec unless saving captures from config conditions
reduce memory allocations per request where lighttpd.conf does not contain url.redirect or url.rewrite rules where replacements reference a match of the enclosing lighttpd.conf condition (e.g. %0, %1, %2 ...)
move cond_cache_t 'patterncount' to cond_match_t 'captures' While cond_match_t is no longer sized power-2, it is generally expected to be used much less frequently than before (which was all the time), since it is now used only with url.redirect or url.rewrite with references %0, %1, %2, ...
show more ...
|
| #
7ea2d407 |
| 19-Nov-2021 |
Glenn Strauss <[email protected]> |
[core] save config regex captures only if used
save config regex captures separately only if used by url.redirect or url.rewrite replacement directives within the condition (or for conditions contai
[core] save config regex captures only if used
save config regex captures separately only if used by url.redirect or url.rewrite replacement directives within the condition (or for conditions containing directives from any other module which calls config_capture() for its directives during init)
keep pointer to match data (cond_match_t *) in r->cond_match[] rather than cond_match_t to reduce data copying in h2_init_stream(). h2_init_stream() copies the results for already-evaluated conditions to avoid re-evaluating connection-level conditions for each and every stream. When conditions are reset, then the pointer in r->cond_match[] is updated when the condition is re-evaluated. (This all assumes that HTTP/2 connection-level conditions are not unset or re-evaluated once HTTP/2 streams begin.)
show more ...
|
|
Revision tags: lighttpd-1.4.61, lighttpd-1.4.60 |
|
| #
4d99d9b7 |
| 22-Sep-2021 |
Glenn Strauss <[email protected]> |
[multiple] check feature flags funcs; code reuse
config_feature_bool() config_feature_int()
|
| #
af3df29a |
| 09-Jun-2021 |
Glenn Strauss <[email protected]> |
[multiple] reduce redundant NULL buffer checks
This commit is a large set of code changes and results in removal of hundreds, perhaps thousands, of CPU instructions, a portion of which are on hot co
[multiple] reduce redundant NULL buffer checks
This commit is a large set of code changes and results in removal of hundreds, perhaps thousands, of CPU instructions, a portion of which are on hot code paths.
Most (buffer *) used by lighttpd are not NULL, especially since buffers were inlined into numerous larger structs such as request_st and chunk.
In the small number of instances where that is not the case, a NULL check is often performed earlier in a function where that buffer is later used with a buffer_* func. In the handful of cases that remained, a NULL check was added, e.g. with r->http_host and r->conf.server_tag.
- check for empty strings at config time and set value to NULL if blank string will be ignored at runtime; at runtime, simple pointer check for NULL can be used to check for a value that has been set and is not blank ("") - use buffer_is_blank() instead of buffer_string_is_empty(), and use buffer_is_unset() instead of buffer_is_empty(), where buffer is known not to be NULL so that NULL check can be skipped - use buffer_clen() instead of buffer_string_length() when buffer is known not to be NULL (to avoid NULL check at runtime) - use buffer_truncate() instead of buffer_string_set_length() to truncate string, and use buffer_extend() to extend
Examples where buffer known not to be NULL: - cpv->v.b from config_plugin_values_init is not NULL if T_CONFIG_BOOL (though we might set it to NULL if buffer_is_blank(cpv->v.b)) - address of buffer is arg (&foo) (compiler optimizer detects this in most, but not all, cases) - buffer is checked for NULL earlier in func - buffer is accessed in same scope without a NULL check (e.g. b->ptr)
internal behavior change: callers must not pass a NULL buffer to some funcs. - buffer_init_buffer() requires non-null args - buffer_copy_buffer() requires non-null args - buffer_append_string_buffer() requires non-null args - buffer_string_space() requires non-null arg
show more ...
|
| #
7b9c5add |
| 14-Mar-2021 |
Glenn Strauss <[email protected]> |
[multiple] PCRE w/ PCRE_STUDY_JIT_COMPILE (fixes #2361)
enabled by default disable using server.feature-flags += ("server.pcre_jit" => "disable")
Available since pcre-8.20 (2011), and improved in p
[multiple] PCRE w/ PCRE_STUDY_JIT_COMPILE (fixes #2361)
enabled by default disable using server.feature-flags += ("server.pcre_jit" => "disable")
Available since pcre-8.20 (2011), and improved in pcre-8.32 (2012), PCRE_STUDY_JIT_COMPILE can greatly speed up repeated execution of PCRE patterns. (https://zherczeg.github.io/sljit/pcre.html)
lighttpd continues to use pcre_exec() instead of pcre_jit_exec(), even though doing so does not realize all of the performance increase potentially available with PCRE_STUDY_JIT_COMPILE and pcre_jit_exec().
pcre_jit_exec() is available with PCRE 8.32 and later, if PCRE is compiled with --enable-jit, but lighttpd does not currently use pcre_jit_exec() since the PCRE library might not have been compiled with --enable-jit (though this could be solved with a weak symbol). Similarly, lighttpd does not currently configure the pcre_jit_stack.
(Using pcre_jit_exec() may be revisited in the future.)
x-ref: "add support for pcre JIT" https://redmine.lighttpd.net/issues/2361
show more ...
|
|
Revision tags: lighttpd-1.4.59 |
|
| #
cf3e3012 |
| 28-Jan-2021 |
Glenn Strauss <[email protected]> |
[core] tighten struct data_config and related code
tighten struct data_config and config_cond_info create config key at startup and reuse for debug/trace separate routine for configparser_parse_cond
[core] tighten struct data_config and related code
tighten struct data_config and config_cond_info create config key at startup and reuse for debug/trace separate routine for configparser_parse_condition() separate routine for configparser_parse_else_condition()
show more ...
|
|
Revision tags: lighttpd-1.4.58, lighttpd-1.4.57, lighttpd-1.4.56, lighttpd-1.4.56-rc7, lighttpd-1.4.56-rc6, lighttpd-1.4.56-rc5, lighttpd-1.4.56-rc4, lighttpd-1.4.56-rc3, lighttpd-1.4.56-rc2, lighttpd-1.4.56-rc1 |
|
| #
fe021118 |
| 13-Oct-2020 |
Glenn Strauss <[email protected]> |
[multiple] stat_cache_path_stat() for struct st
stat_cache_path_stat() for cached (struct st *)
|
| #
33c8cf41 |
| 25-Jul-2020 |
Glenn Strauss <[email protected]> |
[multiple] rename connection_reset hook to request
rename connection_reset to handle_request_reset
|
|
Revision tags: lighttpd-1.4.55 |
|
| #
a0029b21 |
| 20-Jan-2020 |
Glenn Strauss <[email protected]> |
[core] remove r->uri.path_raw; generate as needed
(r->uri.path_raw previously duplicated from r->target, minus query-part)
|
| #
7c7f8c46 |
| 13-Jan-2020 |
Glenn Strauss <[email protected]> |
[multiple] split con, request (very large change)
NB: r->tmp_buf == srv->tmp_buf (pointer is copied for quicker access)
NB: request read and write chunkqueues currently point to connection chun
[multiple] split con, request (very large change)
NB: r->tmp_buf == srv->tmp_buf (pointer is copied for quicker access)
NB: request read and write chunkqueues currently point to connection chunkqueues; per-request and per-connection chunkqueues are not distinct from one another con->read_queue == r->read_queue con->write_queue == r->write_queue
NB: in the future, a separate connection config may be needed for connection-level module hooks. Similarly, might need to have per-request chunkqueues separate from per-connection chunkqueues. Should probably also have a request_reset() which is distinct from connection_reset().
show more ...
|
| #
cc2134c8 |
| 11-Jan-2020 |
Glenn Strauss <[email protected]> |
[multiple] copy small struct instead of memcpy()
when patching config
|
| #
31d94953 |
| 11-Jan-2020 |
Glenn Strauss <[email protected]> |
[core] store subrequest_handler instead of mode
store pointer to module in handler_module instead of con->mode id
|
| #
100dfaa3 |
| 09-Jan-2020 |
Glenn Strauss <[email protected]> |
[core] move plugin_ctx into (request_st *)
NB: in the future, a separate plugin_ctx may be needed for connection-level plugins to keep state across multiple requests
|
| #
8131e439 |
| 09-Jan-2020 |
Glenn Strauss <[email protected]> |
[core] move addtl request-specific struct members
|
| #
ca97505a |
| 08-Dec-2019 |
Glenn Strauss <[email protected]> |
[multiple] store srv->tmp_buf in tb var
rather than using srv->tmp_buf directly in code modifying temp buf (tb)
|
| #
03b4c993 |
| 08-Dec-2019 |
Glenn Strauss <[email protected]> |
[multiple] generic config array type checking
|
| #
68d8d4c5 |
| 05-Dec-2019 |
Glenn Strauss <[email protected]> |
[multiple] stat_cache singleton
|
| #
50bdb55d |
| 26-Nov-2019 |
Glenn Strauss <[email protected]> |
[multiple] connection hooks no longer get (srv *)
(explicit (server *) not passed; available in con->srv)
|
| #
010c2894 |
| 25-Nov-2019 |
Glenn Strauss <[email protected]> |
[multiple] prefer (connection *) to (srv *)
convert all log_error_write() to log_error() and pass (log_error_st *)
use con->errh in preference to srv->errh (even though currently same)
avoid passi
[multiple] prefer (connection *) to (srv *)
convert all log_error_write() to log_error() and pass (log_error_st *)
use con->errh in preference to srv->errh (even though currently same)
avoid passing (server *) when previously used only for logging (errh)
show more ...
|
| #
c193da34 |
| 21-Nov-2019 |
Glenn Strauss <[email protected]> |
[core] split cond cache from cond matches
|
| #
b73949e0 |
| 19-Nov-2019 |
Glenn Strauss <[email protected]> |
[multiple] plugin.c handles common FREE_FUNC code
(simpler for modules; less boilerplate to cut-n-paste)
|
| #
d23071a3 |
| 17-Nov-2019 |
Glenn Strauss <[email protected]> |
[core] config_get_config_cond_info()
isolate direct use of (data_config *)
|