remove the caching of text_svg
Some checks are pending
/ test (push) Waiting to run

Since the longest part of the algorithm is saving and reloading the
data this speeds up the entire process. Next we can make sure every
slide's text gets made and added individually such that they can be
made one at a time and see the changes nearly instant
This commit is contained in:
Chris Cochrun 2025-10-23 10:34:07 -05:00
parent 9aedc7a095
commit 8c709d97d1

View file

@ -339,15 +339,16 @@ impl TextSvg {
Pixmap::new(size.width as u32, size.height as u32) Pixmap::new(size.width as u32, size.height as u32)
.expect("opops"); .expect("opops");
resvg::render(&resvg_tree, transform, &mut pixmap.as_mut()); resvg::render(&resvg_tree, transform, &mut pixmap.as_mut());
let _ = pixmap.save_png(&path);
debug!("rendered"); debug!("rendered");
let handle = Handle::from_path(path); // let _ = pixmap.save_png(&path);
// let handle = Handle::from_rgba(
// size.width as u32, debug!("saved");
// size.height as u32, // let handle = Handle::from_path(path);
// pixmap.take(), let handle = Handle::from_rgba(
// ); size.width as u32,
size.height as u32,
pixmap.take(),
);
self.handle = Some(handle); self.handle = Some(handle);
debug!("stored"); debug!("stored");
self self