diff --git a/benches/gigantic.svg b/benches/gigantic.svg new file mode 100644 index 0000000..15336e2 --- /dev/null +++ b/benches/gigantic.svg @@ -0,0 +1,432 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/benches/xml.rs b/benches/xml.rs index e000caf..9511dbc 100644 --- a/benches/xml.rs +++ b/benches/xml.rs @@ -98,6 +98,13 @@ fn huge_roxmltree(bencher: &mut Bencher) { bencher.iter(|| roxmltree::Document::parse(&text).unwrap()) } +fn gigantic_roxmltree(bencher: &mut Bencher) { + let text = std::fs::read_to_string("gigantic.svg").unwrap(); + let mut opt = roxmltree::ParsingOptions::default(); + opt.allow_dtd = true; + bencher.iter(|| roxmltree::Document::parse_with_options(&text, opt).unwrap()) +} + fn cdata_roxmltree(bencher: &mut Bencher) { let text = std::fs::read_to_string("cdata.xml").unwrap(); bencher.iter(|| roxmltree::Document::parse(&text).unwrap()) @@ -313,6 +320,7 @@ benchmark_group!( medium_roxmltree, large_roxmltree, huge_roxmltree, + gigantic_roxmltree, cdata_roxmltree, text_roxmltree, attributes_roxmltree