diff --git a/map_gui/src/tools/command.rs b/map_gui/src/tools/command.rs index ad9920b64c..aa52aedb44 100644 --- a/map_gui/src/tools/command.rs +++ b/map_gui/src/tools/command.rs @@ -131,7 +131,13 @@ impl State for RunCommand { .small_heading(), ); for line in &self.lines { - txt.add_line(line); + // Previously, map importing produced some very long lines, which slowed down + // rendering a bunch. The origin of the long output was fixed, but still skip very + // long lines generally -- this is just a loading screen showing command output, no + // need to display everything perfectly. + if line.len() < 300 { + txt.add_line(line); + } } self.panel = ctx.make_loading_screen(txt); self.last_drawn = Instant::now(); diff --git a/map_model/src/map.rs b/map_model/src/map.rs index 0722b69a9e..221a678aa4 100644 --- a/map_model/src/map.rs +++ b/map_model/src/map.rs @@ -1146,8 +1146,8 @@ pub fn turn_type_from_road_geom( // turn_type_from_angles. Correct it based on relative ordering. if turn_type != *expected_type { warn!( - "Turn from {:?} to {:?} looks like {:?} by angle, but is {:?} by ordering", - r1, r2, turn_type, expected_type + "Turn from {} to {} looks like {:?} by angle, but is {:?} by ordering", + r1.orig_id, r2.orig_id, turn_type, expected_type ); turn_type = *expected_type; } diff --git a/widgetry/src/svg.rs b/widgetry/src/svg.rs index 17a1aeb2d2..730f4a4d8f 100644 --- a/widgetry/src/svg.rs +++ b/widgetry/src/svg.rs @@ -75,15 +75,12 @@ pub(crate) fn add_svg_inner( if let Some(ref fill) = p.fill { let color = convert_color(&fill.paint, fill.opacity.get()); let geom = mesh_per_color.mut_or_insert(color, VertexBuffers::new); - if fill_tess - .tessellate( - &convert_path(p), - &tessellation::FillOptions::tolerance(tolerance), - &mut simple_builder(geom), - ) - .is_err() - { - return Err("Couldn't tessellate something".to_string()); + if let Err(err) = fill_tess.tessellate( + &convert_path(p), + &tessellation::FillOptions::tolerance(tolerance), + &mut simple_builder(geom), + ) { + return Err(format!("Couldn't tessellate something: {err}")); } } diff --git a/widgetry/src/text.rs b/widgetry/src/text.rs index 37b9658096..cf39a2b8bf 100644 --- a/widgetry/src/text.rs +++ b/widgetry/src/text.rs @@ -515,7 +515,11 @@ fn render_line(spans: Vec, tolerance: f32, assets: &Assets) -> GeomBat let mut batch = GeomBatch::new(); match crate::svg::add_svg_inner(&mut batch, svg_tree, tolerance) { Ok(_) => batch, - Err(err) => panic!("render_line({}): {}", contents, err), + Err(err) => { + error!("render_line({}): {}", contents, err); + // We'll just wind up with a blank line + batch + } } } @@ -618,7 +622,10 @@ impl TextSpan { let mut batch = GeomBatch::new(); match crate::svg::add_svg_inner(&mut batch, svg_tree, tolerance) { Ok(_) => batch, - Err(err) => panic!("curvey({}): {}", self.text, err), + Err(err) => { + error!("render_curvey({}): {}", self.text, err); + batch + } } } }