Closed mgeisler closed 7 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
ec5968c
) 90.64% compared to head (62c36d2
) 90.64%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Just a thought - maybe we should add several bench
targets so that we can find how performance of the code changes. Does not have to be exposed during PR build but something that is easy to trigger locally.
Just a thought - maybe we should add several
bench
targets so that we can find how performance of the code changes. Does not have to be exposed during PR build but something that is easy to trigger locally.
That would indeed be a useful tool to have!
For this, I used https://github.com/sharkdp/hyperfine like this:
% MDBOOK_OUTPUT='{"xgettext": {"pot-file": "messages-10.pot", "granularity": 10}}' hyperfine 'mdbook build -d po'
to test only mdbook-xgettext
. But if we could put this into a criterion
benchmark as well, then that would be nice.
Before we would load and deserialize the
syntect
syntax trees (Sublime Text syntax definitions) on every call. We now cache this read-only data.Before,
mdbook build
took 1.44 s, now it takes 0.56 s instead. I started looking in to optimizing this because I'm considering makingmdbook-xgettext
an (optional) plugin inbook.toml
for Comprehensive Rust. This will imply that we run the plugin on everymdbook build
— at least for people like me who have the plugin installed.