lemmy/crates
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 44b1049970.

* 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 b4528e5b85.

* Revert "Add dhat-heap feature"

This reverts commit 08e835d487.

* 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
..
api Don't check verified email when an admin logs in (#3209) 2023-06-20 08:52:21 -04:00
api_common Fix parameter ordering for new_report_subject string (#3210) 2023-06-20 11:24:04 -04:00
api_crud Prevent making an instance private if federation is enabled. (#3074) 2023-06-15 11:35:09 +02:00
apub Calculate initial hot_rank and hot_rank_active for posts and comments from other instances (#3131) 2023-06-20 10:52:51 +02:00
db_schema Feature add hours as sorting options backend (#3161) 2023-06-20 16:05:43 +02:00
db_views Fixing comment_view unit tests. (#3224) 2023-06-20 14:14:08 -04:00
db_views_actor Feature add hours as sorting options backend (#3161) 2023-06-20 16:05:43 +02:00
db_views_moderator Adding comments to all API related types. Fixes #2846 (#2848) 2023-05-10 21:20:39 +02:00
routes Update all dependencies (#3091) 2023-06-15 11:37:05 +02:00
utils Reduce memory usage of rate limiting (#3111) 2023-06-21 10:28:20 +02:00