diff options
| author | mat <git@matdoes.dev> | 2026-03-19 22:09:06 -0900 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2026-03-19 22:09:06 -0900 |
| commit | c79dba5070b33c5f8504c0ad479e387c1e9ec423 (patch) | |
| tree | 71dd4bdbdc426b3b8535827f067bea089b9a5873 | |
| parent | 2446ced45b7a3365000c21360498ec341bc6e072 (diff) | |
| download | azalea-drasl-c79dba5070b33c5f8504c0ad479e387c1e9ec423.tar.xz | |
more doc fixes
| -rw-r--r-- | azalea-block/src/lib.rs | 3 | ||||
| -rw-r--r-- | azalea/src/_docs/performance.md | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/azalea-block/src/lib.rs b/azalea-block/src/lib.rs index 9e2a3c5c..3b0f5170 100644 --- a/azalea-block/src/lib.rs +++ b/azalea-block/src/lib.rs @@ -16,6 +16,9 @@ pub use block_state::BlockState; pub use generated::{blocks, properties}; pub use range::BlockStates; +/// A trait that's implemented on block structs. +/// +/// See the [azalea_block documentation](crate) for details. pub trait BlockTrait: Debug + Any { fn behavior(&self) -> BlockBehavior; /// Get the Minecraft string ID for this block. diff --git a/azalea/src/_docs/performance.md b/azalea/src/_docs/performance.md index 40b25040..cd665f8c 100644 --- a/azalea/src/_docs/performance.md +++ b/azalea/src/_docs/performance.md @@ -6,7 +6,7 @@ This guide is for those who want to learn more about Azalea's performance charac Typically, one Azalea bot with 8 chunk render distance (the default) will idle on about 20mb-40mb of memory on a normal world. If you're using a swarm, the world information (chunks, entities, registries) is shared between bots. -This means that each new bot in a swarm should be relatively cheap -- usually about 1mb extra per bot -- though it may be more if they're spread apart. +This means that each new bot in a swarm should be relatively cheap -- usually up to 1mb extra per bot -- though it may be more if they're spread apart. As for CPU usage, Azalea is meant to be able to run on weak servers, but it may struggle at large swarm sizes, especially if you're using the pathfinder. By default, swarms should be able to handle up to a few hundred bots, depending on your hardware. @@ -35,7 +35,7 @@ For maximum performance, it is still recommended to compile your bot with releas ## Compilation options -An easy win is to enable LTO (not thin LTO) by putting the following line in your `Cargo.toml`: +An easy win is to enable LTO (not thin LTO) by putting the following lines in your `Cargo.toml`: ```toml [profile.release] lto = true @@ -64,7 +64,7 @@ For instance, this can be a simple timer or an averaged CPU usage measurement. Profiling is to help you identify the slow parts of your code. The recommended tool for this is [`cargo-flamegraph`](https://github.com/flamegraph-rs/flamegraph), just make sure to enable `force-frame-pointers` and `debuginfo`. -Some specific suggestions will not be mentioned in this guide because they would become obvious from profiling, or because they're already mentioned in the relevant Azalea documentation. +Some specific suggestions will not be mentioned in this guide because they're already mentioned in the relevant Azalea documentation. I would also recommend reading Nethercote's [Rust Performance Book](https://nnethercote.github.io/perf-book/title-page.html) for more performance tips. |
