diff --git a/src/math_app.rs b/src/math_app.rs index 422acbf..af43bee 100644 --- a/src/math_app.rs +++ b/src/math_app.rs @@ -122,6 +122,8 @@ impl MathApp { #[allow(dead_code)] // This is used lol /// Create new instance of [`MathApp`] and return it pub fn new(cc: &eframe::CreationContext<'_>) -> Self { + let start = instant::Instant::now(); + // Remove loading indicator on wasm #[cfg(target_arch = "wasm32")] stop_loading(); @@ -138,8 +140,6 @@ impl MathApp { tracing::info!("Web Info: {:?}", web_info); } - let start = instant::Instant::now(); - tracing::info!("Loading assets..."); let mut tar_file_data = Vec::new(); let _ = ruzstd::StreamingDecoder::new(&mut include_bytes!("../assets.tar.zst").as_slice()) @@ -244,13 +244,11 @@ impl MathApp { ]), }; - tracing::info!("Done loading assets! Took: {:?}", start.elapsed()); - // Initialize fonts // this used to be in the `update` method, but (after a ton of digging) this actually caused OOMs. that was a pain to debug cc.egui_ctx.set_fonts(fonts); - tracing::info!("egui app initialized."); + tracing::info!("Initialized! Took: {:?}", start.elapsed()); Self { functions: vec![DEFAULT_FUNCTION_ENTRY.clone()],