
# Objective Fixes #18103 #17330 introduced a significant compile time performance regression (affects normal builds, clippy, and Rust Analyzer). While it did fix the type-resolution bug (and the general approach there is still our best known solution to the problem that doesn't involve [significant maintenance overhead](https://github.com/bevyengine/bevy/issues/18103#issuecomment-2702724676)), the changes had a couple of issues: 1. It used a Mutex, which poses a significant threat to parallelization. 2. It externalized existing, relatively simple, performance critical Bevy code to a crate outside of our control. I am not comfortable doing that for cases like this. Going forward @bevyengine/maintainer-team should be much stricter about this. 3. There were a number of other areas that introduced complexity and overhead that I consider unnecessary for our use case. On a case by case basis, if we encounter a need for more capabilities we can add them (and weigh them against the cost of doing so). ## Solution 1. I moved us back to our original code as a baseline 2. I selectively ported over the minimal changes required to fix the type resolution bug 3. I swapped `Mutex<BTreeMap<PathBuf, &'static Mutex<CargoManifest>>>` for `RwLock<BTreeMap<PathBuf, CargoManifest>>`. Note that I used the `parking_lot` RwLock because it has a mapping API that enables us to return mapped guards.
25 lines
529 B
Rust
25 lines
529 B
Rust
#![forbid(unsafe_code)]
|
|
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
|
#![doc(
|
|
html_logo_url = "https://bevyengine.org/assets/icon.png",
|
|
html_favicon_url = "https://bevyengine.org/assets/icon.png"
|
|
)]
|
|
|
|
//! A collection of helper types and functions for working on macros within the Bevy ecosystem.
|
|
|
|
extern crate alloc;
|
|
extern crate proc_macro;
|
|
|
|
mod attrs;
|
|
mod bevy_manifest;
|
|
pub mod fq_std;
|
|
mod label;
|
|
mod shape;
|
|
mod symbol;
|
|
|
|
pub use attrs::*;
|
|
pub use bevy_manifest::*;
|
|
pub use label::*;
|
|
pub use shape::*;
|
|
pub use symbol::*;
|