|
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, lighttpd-1.4.61, lighttpd-1.4.60 |
|
| #
062ea98b |
| 13-Sep-2021 |
Glenn Strauss <[email protected]> |
[multiple] prefer r->tmp_buf to p->tmp_buf
prefer per-request r->tmp_buf to per-module p->tmp_buf to marginally increase buf reuse during each request. (currently, r->tmp_buf == srv->tmp_buf)
(avoi
[multiple] prefer r->tmp_buf to p->tmp_buf
prefer per-request r->tmp_buf to per-module p->tmp_buf to marginally increase buf reuse during each request. (currently, r->tmp_buf == srv->tmp_buf)
(avoid some persistent memory allocations per-module, as those are not currently cleared/released periodically)
show more ...
|
| #
67c0b149 |
| 02-Aug-2021 |
Glenn Strauss <[email protected]> |
[multiple] remove base.h include where not used
(substitute request.h if file only accesses request_st, and not connection or server structs)
|
| #
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 ...
|
| #
dc01487e |
| 25-Mar-2021 |
Glenn Strauss <[email protected]> |
[multiple] use buffer_append_* aggregates
reduces the number of round-trips into some frequently-called routines
|
|
Revision tags: lighttpd-1.4.59, 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 |
|
| #
f846a392 |
| 09-Oct-2020 |
Glenn Strauss <[email protected]> |
[multiple] use stat_cache_path_isdir()
|
| #
c752d469 |
| 22-Feb-2020 |
Glenn Strauss <[email protected]> |
[multiple] correct misspellings in comments
x-ref: "Script for fixing spelling errors with codespell" https://redmine.lighttpd.net/boards/3/topics/8947
|
|
Revision tags: lighttpd-1.4.55 |
|
| #
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
|
| #
8131e439 |
| 09-Jan-2020 |
Glenn Strauss <[email protected]> |
[core] move addtl request-specific struct members
|
| #
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 ...
|
| #
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)
|
| #
28691e6f |
| 02-Nov-2019 |
Glenn Strauss <[email protected]> |
[mod_simple_vhost] use config_plugin_values_init()
replace caching with one-element cache of last directory root
stat_cache is a cache and will handle additional caching, as configured
|
| #
e2de4e58 |
| 19-Oct-2019 |
Glenn Strauss <[email protected]> |
[core] const char *name in struct plugin
put void *data (always used) as first member of struct plugin
add int nconfig member to PLUGIN_DATA
calloc() inits p->data to NULL
|
| #
36f64b26 |
| 17-Oct-2019 |
Glenn Strauss <[email protected]> |
[core] simpler config_check_cond()
optimize for common case where condition has been evaluated for the request and a cached result exists
(also: begin isolating data_config)
|
| #
47a758f9 |
| 13-Oct-2019 |
Glenn Strauss <[email protected]> |
[core] inline buffer key for *_patch_connection()
handle buffer key as part of DATA_UNSET in *_patch_connection() (instead of key being (buffer *))
|
| #
0ce30f8c |
| 10-Oct-2019 |
Glenn Strauss <[email protected]> |
[core] (const buffer *) for con->server_name
use con->server_name_buf when modules set server_name (e.g from db)
|
|
Revision tags: lighttpd-1.4.54 |
|
| #
6a988bb0 |
| 27-Feb-2019 |
Mohammed Sadiq <[email protected]> |
[multiple] cleaner calloc use in SETDEFAULTS_FUNC
github: closes #99
x-ref: "cleaner calloc use in SETDEFAULTS_FUNC" https://github.com/lighttpd/lighttpd1.4/pull/99
|
|
Revision tags: lighttpd-1.4.53 |
|
| #
b2a62398 |
| 02-Dec-2018 |
Glenn Strauss <[email protected]> |
[mod_simple_vhost] t/test_mod_simple_vhost
create t/test_mod_simple_vhost to test mod_simple_vhost basic logic remove tests/mod-simplevhost.t, which was not testing mod_simple_vhost
|
|
Revision tags: lighttpd-1.4.52, lighttpd-1.4.51, lighttpd-1.4.50, lighttpd-1.4.49, lighttpd-1.4.48, lighttpd-1.4.47, lighttpd-1.4.46 |
|
| #
a53f662a |
| 24-Mar-2017 |
Glenn Strauss <[email protected]> |
[core] remove some unused header includes
remove exposure of stdio.h in buffer.h for print_backtrace(), now static
|
| #
1485cb40 |
| 13-Mar-2017 |
Glenn Strauss <[email protected]> |
[core] fix crash if invalid config file (fixes #2798)
If lighttpd.conf is invalid, some modules may not have initialized their per-context config structures, but will have their free-functions calle
[core] fix crash if invalid config file (fixes #2798)
If lighttpd.conf is invalid, some modules may not have initialized their per-context config structures, but will have their free-functions called, which should not be run on uninitialized per-context configs.
x-ref: "Segfault with simple-vhost.debug = "enable"" https://redmine.lighttpd.net/issues/2798
show more ...
|
|
Revision tags: lighttpd-1.4.45, lighttpd-1.4.44, lighttpd-1.4.43, lighttpd-1.4.42, lighttpd-1.4.41, lighttpd-1.4.40 |
|
| #
8abd06a7 |
| 19-Mar-2016 |
Glenn Strauss <[email protected]> |
consistent inclusion of config.h at top of files (fixes #2073)
From: Glenn Strauss <[email protected]>
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3113 152afb58-edef-03
consistent inclusion of config.h at top of files (fixes #2073)
From: Glenn Strauss <[email protected]>
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3113 152afb58-edef-0310-8abb-c4023f1b3aa9
show more ...
|