Tree:
614250b4d8
master
personal/gstrauss/master
personal/stbuehler/1.4.48-mod-proxy-fix
personal/stbuehler/ci-build
personal/stbuehler/cleanup-build
personal/stbuehler/fix-fdevent
personal/stbuehler/mod-csrf
personal/stbuehler/mod-csrf-old
lighttpd-1.3.11
lighttpd-1.3.12
lighttpd-1.3.13
lighttpd-1.3.14
lighttpd-1.3.15
lighttpd-1.3.16
lighttpd-1.4.1
lighttpd-1.4.10
lighttpd-1.4.11
lighttpd-1.4.12
lighttpd-1.4.13
lighttpd-1.4.14
lighttpd-1.4.15
lighttpd-1.4.16
lighttpd-1.4.17
lighttpd-1.4.18
lighttpd-1.4.19
lighttpd-1.4.2
lighttpd-1.4.20
lighttpd-1.4.21
lighttpd-1.4.22
lighttpd-1.4.23
lighttpd-1.4.24
lighttpd-1.4.25
lighttpd-1.4.26
lighttpd-1.4.27
lighttpd-1.4.28
lighttpd-1.4.29
lighttpd-1.4.3
lighttpd-1.4.30
lighttpd-1.4.31
lighttpd-1.4.32
lighttpd-1.4.33
lighttpd-1.4.34
lighttpd-1.4.35
lighttpd-1.4.36
lighttpd-1.4.36--rc1
lighttpd-1.4.37
lighttpd-1.4.38
lighttpd-1.4.39
lighttpd-1.4.4
lighttpd-1.4.40
lighttpd-1.4.41
lighttpd-1.4.42
lighttpd-1.4.43
lighttpd-1.4.44
lighttpd-1.4.45
lighttpd-1.4.46
lighttpd-1.4.47
lighttpd-1.4.48
lighttpd-1.4.49
lighttpd-1.4.5
lighttpd-1.4.50
lighttpd-1.4.51
lighttpd-1.4.52
lighttpd-1.4.53
lighttpd-1.4.54
lighttpd-1.4.55
lighttpd-1.4.56
lighttpd-1.4.56-rc1
lighttpd-1.4.56-rc2
lighttpd-1.4.56-rc3
lighttpd-1.4.56-rc4
lighttpd-1.4.56-rc5
lighttpd-1.4.56-rc6
lighttpd-1.4.56-rc7
lighttpd-1.4.57
lighttpd-1.4.58
lighttpd-1.4.59
lighttpd-1.4.6
lighttpd-1.4.60
lighttpd-1.4.61
lighttpd-1.4.62
lighttpd-1.4.63
lighttpd-1.4.64
lighttpd-1.4.65
lighttpd-1.4.7
lighttpd-1.4.8
lighttpd-1.4.9
${ noResults }
2 Commits (614250b4d82b7c471cc68ba011e7b3d658417f22)
Author | SHA1 | Message | Date |
---|---|---|---|
|
af3df29ae8 |
[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 |
10 months ago |
|
655453a195 |
[core] inet_ntop_cache -> sock_addr_cache
* rename inet_ntop_cache.[ch] to sock_addr_cache.[ch] * reimplement as separate caches for IPv4 and IPv6 |
2 years ago |