mirror of
https://github.com/martinvonz/jj.git
synced 2024-12-27 06:27:43 +00:00
32afea198a
After upgrading pest from 2.7.8 to 2.7.9, I noticed CLI tests got significantly slow (something around 40sec -> 60sec on my laptop.) I suspect this would be caused by detailed error state tracking introduced in 2.7.9, but it's also true that our template grammar exercises such code path. My understanding is that PEG is basically a top down parsing with unlimited lookahead. Before this change, the default commit_summary template would be parsed as follows: 1. parse the outermost separate(..) as "term" 2. "concat" rule can't continue, so 3. reparse the whole string as "expression" Because this pattern is not uncommon, I think it's better to rewrite the grammar to avoid large retry. With this patch, our tests runs within ~50sec under debug build. It appears to save a few milliseconds in release build, but my development environment isn't quiet enough to say the difference is significant. |
||
---|---|---|
.. | ||
examples | ||
src | ||
testing | ||
tests | ||
build.rs | ||
Cargo.toml | ||
LICENSE |