Sat, 10 Jun 2023 13:06:05 +0200 Merge 0.12->trunk
Kim Alvefur <zash@zash.se> [Sat, 10 Jun 2023 13:06:05 +0200] rev 13145
Merge 0.12->trunk
Sat, 10 Jun 2023 12:18:09 +0200 mod_http: Simplify conversion of Set to Array
Kim Alvefur <zash@zash.se> [Sat, 10 Jun 2023 12:18:09 +0200] rev 13144
mod_http: Simplify conversion of Set to Array Avoids the _items semi-private value, that is used everywhere for some reason.
Sat, 10 Jun 2023 12:33:58 +0200 mod_http: Fix error if 'access_control_allow_origins' is set 0.12
Kim Alvefur <zash@zash.se> [Sat, 10 Jun 2023 12:33:58 +0200] rev 13143
mod_http: Fix error if 'access_control_allow_origins' is set Because it changes the type of the 'opt_origins' variable from util.set to the internal _items table so next time an http app is added an error "attempt to call a nil value (method 'empty')" is triggered. The value is not used anywhere else. Noticed when reviewing uses of the '_items' set property. Not reported by any users, implying this setting is rarely used.
Sat, 10 Jun 2023 12:14:12 +0200 util.array: Expose new() on module table 0.12
Kim Alvefur <zash@zash.se> [Sat, 10 Jun 2023 12:14:12 +0200] rev 13142
util.array: Expose new() on module table For consistency with other utils. Consistency is good.
Fri, 14 May 2021 05:49:35 +0200 util.datamanager: Halve size of list index
Kim Alvefur <zash@zash.se> [Fri, 14 May 2021 05:49:35 +0200] rev 13141
util.datamanager: Halve size of list index Instead of storing (start, length) tuples, store the offset to the end of items and derive length using the previous entry.
Wed, 12 May 2021 01:32:03 +0200 mod_storage_internal: Use a binary search for time based ranges
Kim Alvefur <zash@zash.se> [Wed, 12 May 2021 01:32:03 +0200] rev 13140
mod_storage_internal: Use a binary search for time based ranges Iterating over an entire archive to find a few items in the far end from where iteration started is expensive, and probably more expensive with the lazy-loading of items added in the previous commit. Since we can now efficiently read items in random order, we can now use a binary search to find a better starting point for iteration.
Wed, 12 May 2021 01:25:44 +0200 mod_storage_internal: Lazy-load archive items while iterating
Kim Alvefur <zash@zash.se> [Wed, 12 May 2021 01:25:44 +0200] rev 13139
mod_storage_internal: Lazy-load archive items while iterating Very large list files previously ran into limits of the Lua parser, or just caused Prosody to freeze while parsing. Using the new index we can parse individual items one at a time. This probably won't reduce overall CPU usage, probably the opposite, but it will reduce the number of items in memory at once and allow collection of items after we iterated past them.
Tue, 11 May 2021 02:09:56 +0200 util.datamanager: Add O(1) list indexing with on-disk index
Kim Alvefur <zash@zash.se> [Tue, 11 May 2021 02:09:56 +0200] rev 13138
util.datamanager: Add O(1) list indexing with on-disk index Index file contains offsets and lengths of each item() which allows seeking directly to each item and reading it without parsing the entire file. Also allows tricks like binary search, assuming items have some defined order. We take advantage of the 1-based indexing in tables to store a magic header in the 0 position, so that table index 1 ends up at file index 1.
Tue, 11 May 2021 02:04:59 +0200 storagemanager tests: Reorder test data in chronological order
Kim Alvefur <zash@zash.se> [Tue, 11 May 2021 02:04:59 +0200] rev 13137
storagemanager tests: Reorder test data in chronological order Why was the test data not in chronological order? Altho, maybe that was the point? Except for MAM, the data might *not* be in chronological order!
Fri, 09 Jun 2023 17:38:46 +0200 mod_admin_shell: Use new serialize preset to simplify default config
Kim Alvefur <zash@zash.se> [Fri, 09 Jun 2023 17:38:46 +0200] rev 13136
mod_admin_shell: Use new serialize preset to simplify default config Two pairs replaced by one. Blame lua-format for the line diff delta.
(0) -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 tip