Make Current measurement serializable

Note that this REALLY slows it down, since it forces the Region to be
Boxed.

It might make sense at some point to consider introducing a RegionBitmap
type. Maybe keep the original Region type -- for serializing -- but
cache a Bitmap version where perf matters more.
This commit is contained in:
2020-12-06 19:54:02 -08:00
parent fa23989cd9
commit d619383fb9
4 changed files with 62 additions and 19 deletions

View File

@@ -304,6 +304,8 @@ impl Renderer for ColorTermRenderer {
stdout.queue(PrintStyledContent(style(format!("z: {}", z)))).unwrap();
for m in measurements {
// Measurements can be slow to compute
stdout.flush().unwrap();
let meas_string = m.eval(state);
stdout.queue(cursor::MoveDown(1)).unwrap();
stdout.queue(cursor::MoveToColumn(1)).unwrap();