add some more caching around the state file & geometry calculations
able to process a simulation in ~2 seconds in the optimistic path
This commit is contained in:
@@ -561,6 +561,8 @@ impl<S: SampleableSim> Renderer<S> for MultiRenderer<S> {
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct SerializedFrame<S=StaticSim> {
|
||||
pub state: S,
|
||||
/// although not generally necessary to load the sim, saving the measurements is beneficial for
|
||||
/// post-processing.
|
||||
pub measurements: Vec<Box<dyn AbstractMeasurement>>,
|
||||
}
|
||||
|
||||
@@ -588,8 +590,8 @@ impl SerializerRenderer {
|
||||
}
|
||||
}
|
||||
|
||||
/// Same as `new`, but cast to StaticSim before serializing. This tends to result in a smaller
|
||||
/// file.
|
||||
/// Same as `new`, but cast to StaticSim before serializing. This yields a file that's easier
|
||||
/// for post-processing, and may be smaller in size.
|
||||
pub fn new_static(fmt_str: &str) -> Self {
|
||||
Self {
|
||||
fmt_str: fmt_str.into(),
|
||||
|
Reference in New Issue
Block a user