lemmy/crates/utils/src
dullbananas 45818fb4c5
Reduce memory usage of rate limiting (#3111)
* Reduce Vec allocations

* Optimize stuff

* Move embedded migrations to separate crate

* Revert "Move embedded migrations to separate crate"

This reverts commit 44b104997016ee2a1f2c0bb735b75e654666860d.

* clippy, fmt

* Shrink rate limit allowance to f32

* Initialize rate limit allowance directly

* Add removal of old rate limit buckets

* Improve readability

* Remove usage of is_okay_and for Rust 1.67 compatibility

* Add dhat-heap feature

* Fix api_benchmark.sh and add run_and_benchmark.sh

* Revert "Fix api_benchmark.sh and add run_and_benchmark.sh"

This reverts commit b4528e5b85dd3f13cea43d72ada9382200c8fc77.

* Revert "Add dhat-heap feature"

This reverts commit 08e835d487b983c44ce2570d8c396d570d426916.

* Manually revert remaining stuff

* Use Ipv6Addr in RateLimitStorage

* Shrink last_checked in RateLimitBucket to 32 bits

* Fix rate_limit::get_ip

* Stuff (#1)

* Update rate_limiter.rs

* Update mod.rs

* Update scheduled_tasks.rs

* Fix rate_limiter.rs

* Dullbananas patch 1 (#2)

* Update rate_limiter.rs

* Update mod.rs

* Update scheduled_tasks.rs

* Fix rate_limiter.rs

* Rate limit IPv6 addresses in groups

* Fmt lib.rs

* woodpicker trigger

* Refactor and comment `check_rate_limit_full`

* Add `test_split_ipv6`

* Replace -2.0 with UNINITIALIZED_TOKEN_AMOUNT

* Add `test_rate_limiter`

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-06-21 10:28:20 +02:00
..
rate_limit Reduce memory usage of rate limiting (#3111) 2023-06-21 10:28:20 +02:00
settings allow specifying db uri in config file (#2956) 2023-06-09 08:18:22 -04:00
utils Fixes #1884 - Support Spoiler Tags (#3018) 2023-06-14 13:15:59 +02:00
apub.rs Fixing .drone.yml (#2677) 2023-01-30 14:17:24 -05:00
claims.rs Extract Activitypub logic into separate library (#2288) 2022-06-02 16:33:41 +02:00
email.rs use usize::MAX for line wrap length, since lettre does it for us (#3034) 2023-06-12 15:29:15 +02:00
error.rs Set attribute deny_unknown_fields for Lemmy config (#2852) 2023-05-11 20:12:12 -04:00
lib.rs Reduce memory usage of rate limiting (#3111) 2023-06-21 10:28:20 +02:00
request.rs Add cargo feature for building lemmy_api_common with mininum deps (#2243) 2022-05-03 17:44:13 +00:00
version.rs For untagged commits, include hash in version name (fixes #1563) 2021-04-12 13:47:58 +02:00