···11use maudit::{
22- BuildOptions,
22+ BuildOptions, PrefetchOptions, PrefetchStrategy,
33 content::{UntypedMarkdownContent, glob_markdown},
44 content_sources, coronate, routes,
55};
···99 let _ = coronate(
1010 routes![page::Article],
1111 content_sources!["articles" => glob_markdown::<UntypedMarkdownContent>(&format!("content/{}/*.md", markdown_count))],
1212- BuildOptions::default(),
1212+ BuildOptions {
1313+ prefetch: PrefetchOptions {
1414+ // This benchmark is really about testing Maudit's Markdown rendering pipeline, if we enable prefetching then a lot of time
1515+ // is spent in bundling, including the script in pages, etc. instead of that. It's still neat to see how much overhead prefetching adds,
1616+ // but not really in this benchmark.
1717+ strategy: PrefetchStrategy::None,
1818+ },
1919+ ..Default::default()
2020+ },
1321 );
1422}
+9-2
benchmarks/overhead/src/lib.rs
···11-use maudit::{BuildOptions, content_sources, coronate, routes};
11+use maudit::{BuildOptions, PrefetchOptions, PrefetchStrategy, content_sources, coronate, routes};
22mod page;
3344pub fn build_website() {
55 let _ = coronate(
66 routes![page::Article],
77 content_sources![],
88- BuildOptions::default(),
88+ BuildOptions {
99+ prefetch: PrefetchOptions {
1010+ // This benchmark is really about testing Maudit's overhead, if we enable prefetching then a lot of time
1111+ // is spent in bundling, including the script in pages, etc. instead of Maudit itself.
1212+ strategy: PrefetchStrategy::None,
1313+ },
1414+ ..Default::default()
1515+ },
916 );
1017}