History log of /lighttpd1.4/src/data_config.c (Results 1 – 25 of 46)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
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)


# 8626edfa 08-Dec-2022 Glenn Strauss <[email protected]>

[core] use data_config_list for config

use data_config_list for config, replacing generated vector_config_weak


Revision tags: lighttpd-1.4.67, lighttpd-1.4.66, lighttpd-1.4.65, lighttpd-1.4.64
# ae2fb974 06-Jan-2022 Stefan Bühler <[email protected]>

[array] use speaking names for array "fn" vtables for better debugging experience


# f58e8dda 15-Dec-2021 Glenn Strauss <[email protected]>

[core] ignore pcre2 "bad JIT option" warning

ignore pcre2 bad JIT option warning for use of PCRE2_JIT_COMPLETE
flag with pcre2_jit_compile() returning PCRE2_ERROR_JIT_BADOPTION

x-ref:
"pcre2 - Pr

[core] ignore pcre2 "bad JIT option" warning

ignore pcre2 bad JIT option warning for use of PCRE2_JIT_COMPLETE
flag with pcre2_jit_compile() returning PCRE2_ERROR_JIT_BADOPTION

x-ref:
"pcre2 - Probable user knowledge bug, but suggestions will be welcome"
https://redmine.lighttpd.net/boards/2/topics/10202

show more ...


Revision tags: lighttpd-1.4.63, lighttpd-1.4.62
# c378e3ad 23-Nov-2021 Glenn Strauss <[email protected]>

[core] allocate pcre output vector on demand

allocate pcre output vector on demand for saved config captures
(similar to what is done in lighttpd for pcre2 support)


# 7512d82c 22-Nov-2021 Glenn Strauss <[email protected]>

[core] pcre2 support (--with-pcre2)

x-ref:
"lighttpd: depends on obsolete pcre3 library"
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1000063


Revision tags: lighttpd-1.4.61, lighttpd-1.4.60
# 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 ...


# cc8e7107 23-May-2021 Glenn Strauss <[email protected]>

[core] make insert_dup an optional array method

make insert_dup an optional array method in data_methods
(currently used only for merging strings of type data_string)


# 4f8f83ea 20-May-2021 Glenn Strauss <[email protected]>

[core] move data_{array,integer,string} to array.c

move native data_* types into array.c
(the types are already declared in array.h)

The array data structure remains extendable, as is done with dat

[core] move data_{array,integer,string} to array.c

move native data_* types into array.c
(the types are already declared in array.h)

The array data structure remains extendable, as is done with data_config
(configfile) and data_auth (mod_auth), though array data structure
primary uses are at startup (config time) and header parsing. The
insertion logic into sorted list can be expensive for large lists,
so header parsing might choose a different data structure in the future.

show more ...


# fbe55825 20-May-2021 Glenn Strauss <[email protected]>

[core] consolidate config printing code

funcs use only at startup and only for lighttpd -p


# 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
# 28f1867c 08-Jul-2020 Glenn Strauss <[email protected]>

quiet clang analyzer scan-build warnings

(expansion of buffer_string_lenth() inline function and CONST_BUF_LEN()
macro, which always check for NULL, appears to cause the analyzer to
believe that a

quiet clang analyzer scan-build warnings

(expansion of buffer_string_lenth() inline function and CONST_BUF_LEN()
macro, which always check for NULL, appears to cause the analyzer to
believe that a pointer might be NULL in cases where it otherwise can
not be NULL)

x-ref:
http://clang-analyzer.llvm.org/faq.html

show more ...


Revision tags: lighttpd-1.4.55
# 24680a91 22-Nov-2019 Glenn Strauss <[email protected]>

[core] array_init() arg for initial size


# 5aadcba4 14-Oct-2019 Glenn Strauss <[email protected]>

[core] buffer string in data_config

(instead of (buffer *))


# a5127803 13-Oct-2019 Glenn Strauss <[email protected]>

[core] const char *op in data_config

(instead of (buffer *))


# c2238256 13-Oct-2019 Glenn Strauss <[email protected]>

[core] inline array as part of data_array value

(instead of value being (array *))


# ad9b7e00 13-Oct-2019 Glenn Strauss <[email protected]>

[core] inline buffer as part of DATA_UNSET key

(instead of key being (buffer *))


# 0c640965 11-Oct-2019 Glenn Strauss <[email protected]>

[core] isolate data_config.c, vector.c

isolate data_config.c, vector.c to lighttpd executable, not modules


# ddb78f75 03-Oct-2019 Glenn Strauss <[email protected]>

[core] remove unused array_reset()


# 70b5d729 02-Oct-2019 Glenn Strauss <[email protected]>

[core] mark some data_* funcs cold

mark funcs cold if seldom used or used only at startup config processing

mark most data_config_* funcs cold

data_*_copy()
data_*_insert_dup()
data_*_print()
data

[core] mark some data_* funcs cold

mark funcs cold if seldom used or used only at startup config processing

mark most data_config_* funcs cold

data_*_copy()
data_*_insert_dup()
data_*_print()
data_*_reset()

array_reset()

show more ...


# b2991c68 02-Oct-2019 Glenn Strauss <[email protected]>

[core] perf: array.c performance enhancements

mark array_get_index() as hot, rewrite to be pure and return sorted pos

mark routines as pure, as appropriate

mark routines as cold if used only at st

[core] perf: array.c performance enhancements

mark array_get_index() as hot, rewrite to be pure and return sorted pos

mark routines as pure, as appropriate

mark routines as cold if used only at startup for config processing

mark params const, as appropriate

array_get_buf_ptr() for modifiable value buffer after insert into array

uint32_t used and size members instead of size_t

remove a->unique_ndx member; simply add to end of array for value lists
remove du->is_index_key member; simply check buffer_is_empty(du->key)

array_insert_key_value() used to be a hint that lookup could be skipped,
but the state from array_get_index() is now saved and reused internally,
so the distinction is no longer needed. Use array_set_key_value().

show more ...


Revision tags: lighttpd-1.4.54, lighttpd-1.4.53, lighttpd-1.4.52
# f69bd9cd 23-Nov-2018 Glenn Strauss <[email protected]>

[core] perf: simple, quick buffer_clear()

quickly clear buffer instead of buffer_string_set_length(b, 0) or
buffer_reset(b). Avoids free() of large buffers about to be reused,
or buffers that are m

[core] perf: simple, quick buffer_clear()

quickly clear buffer instead of buffer_string_set_length(b, 0) or
buffer_reset(b). Avoids free() of large buffers about to be reused,
or buffers that are module-scoped, persistent, and reused.

(buffer_reset() should still be used with buffers in connection *con
when the data in the buffers is supplied by external, untrusted source)

show more ...


Revision tags: lighttpd-1.4.51
# 5b327e00 26-Sep-2018 Glenn Strauss <[email protected]>

[multiple] quiet compiler warnings --without-pcre

quiet compiler warnings for ./configure --without-pcre


# 8c7f1dfb 23-Sep-2018 Glenn Strauss <[email protected]>

[core] more memory-efficient fn table for data_*

save 40 bytes (64-bit), or 16 bytes (32-bit) per data_* element
at the cost of going through indirect function pointer to execute
methods. At runtim

[core] more memory-efficient fn table for data_*

save 40 bytes (64-bit), or 16 bytes (32-bit) per data_* element
at the cost of going through indirect function pointer to execute
methods. At runtime, the reset() method is most used among them.

show more ...


12