chore(deps-rs): bump the minor group across 1 directory with 4 updates - #3212
chore(deps-rs): bump the minor group across 1 directory with 4 updates#3212dependabot[bot] wants to merge 3 commits into
Conversation
Bumps the minor group with 4 updates in the / directory: [serde_with](https://github.com/jonasbb/serde_with), [ordered-float](https://github.com/reem/rust-ordered-float), [pest](https://github.com/pest-parser/pest) and [pest_derive](https://github.com/pest-parser/pest). Updates `serde_with` from 3.21.0 to 3.22.0 - [Release notes](https://github.com/jonasbb/serde_with/releases) - [Commits](jonasbb/serde_with@v3.21.0...v3.22.0) Updates `ordered-float` from 5.3.0 to 5.5.0 - [Release notes](https://github.com/reem/rust-ordered-float/releases) - [Commits](reem/rust-ordered-float@v5.3.0...v5.5.0) Updates `pest` from 2.8.8 to 2.9.0 - [Release notes](https://github.com/pest-parser/pest/releases) - [Commits](pest-parser/pest@v2.8.8...v2.9.0) Updates `pest_derive` from 2.8.8 to 2.9.0 - [Release notes](https://github.com/pest-parser/pest/releases) - [Commits](pest-parser/pest@v2.8.8...v2.9.0) --- updated-dependencies: - dependency-name: serde_with dependency-version: 3.22.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor - dependency-name: ordered-float dependency-version: 5.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor - dependency-name: pest dependency-version: 2.9.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor - dependency-name: pest_derive dependency-version: 2.9.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor ... Signed-off-by: dependabot[bot] <support@github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3212 +/- ##
=======================================
Coverage 81.61% 81.61%
=======================================
Files 242 242
Lines 47649 47649
Branches 41246 41246
=======================================
Hits 38888 38888
Misses 6737 6737
Partials 2024 2024
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merging this PR will degrade performance by 21.73%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | serialization/big_hugr/1048576/sexpr/without_extensions/decode |
256.7 ms | 361.5 ms | -28.99% |
| ❌ | serialization/big_hugr/1048576/sexpr/with_extensions/decode |
256.8 ms | 361.6 ms | -28.98% |
| ❌ | serialization/t_factory/sexpr/without_extensions/decode |
1.4 s | 1.9 s | -22.98% |
| ❌ | serialization/t_factory/sexpr/with_extensions/decode |
1.5 s | 1.9 s | -22.7% |
| ❌ | serialization/big_hugr/1024/sexpr/without_extensions/decode |
738.3 µs | 921 µs | -19.84% |
| ❌ | serialization/big_hugr/1024/sexpr/with_extensions/decode |
844.6 µs | 1,022.9 µs | -17.43% |
| ❌ | serialization/simple_cfg/sexpr/without_extensions/decode |
2.9 ms | 3.5 ms | -17.18% |
| ❌ | serialization/simple_cfg/sexpr/with_extensions/decode |
3.5 ms | 4.1 ms | -14.39% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing dependabot/cargo/minor-6e71564ea2 (b83ae7b) with main (b15dfdb)
|
@codspeedbot explain this regression |
Root cause: the
|
| base (pest 2.8.8) | head (pest 2.9.0) | |
|---|---|---|
| Benchmark total | 738.3 µs | 921.0 µs |
pest::parser_state::state::<…> (the parse) |
519.3 µs (70.3%) | 701.4 µs (76.2%) |
The parse phase grows by +182 µs, and the benchmark grows by +182.7 µs. The subsequent hugr_model AST conversion and hugr_core import are unchanged — this is a pure parser regression.
Two pest internals show up as new hot spots on head that were not significant on base:
pest::stack::Stack::clear_snapshot— 77.5 µs total (8.4%), withVec::drain+ drop-glue as childrenpest::stack::Stack::restore— 37 µs total (4.0%)
2. Reverting only pest fixes it. I built this branch locally and re-ran the affected benchmarks with everything from this PR kept, downgrading only pest 2.9.0 → 2.8.8 in the lockfile:
| Benchmark | pest 2.9.0 | pest 2.8.8 | Local Δ | CodSpeed Δ |
|---|---|---|---|---|
simple_cfg/sexpr/without_extensions/decode |
293.5 µs | 244.9 µs | −16.9% | +17.18% |
big_hugr/1024/sexpr/without_extensions/decode |
60.5 µs | 48.2 µs | −20.0% | +19.84% |
Same machine, same binary otherwise — the local deltas match the CodSpeed report almost exactly, which also confirms the runner-hardware difference flagged in the report is not what you are seeing here.
Why pest 2.9.0 is slower
It is the fix from pest#1184 ("restore stack state after a failed sequence"), which lands in two places:
-
ParserState::sequencenow wraps every sequence in a stack checkpoint:let result = f(self.checkpoint()); // was: f(self) match result { Ok(new_state) => Ok(new_state.checkpoint_ok()), Err(new_state) => Err(new_state.restore()), }
So each sequence now does a
Stack::snapshotplus aclear_snapshot/restore, where before it did nothing. -
Stack::clear_snapshotitself became more expensive. It used to be aVec::popplus atruncate; it now has to merge the snapshot into its parent frame and does aVec::drain(memmove + drop glue) to do so.
Why it hits HUGR s-expression decoding so hard
hugr.pest matches strings and identifiers character by character, e.g.
literal_string_raw = @{ (!("\\" | "\"") ~ ANY)+ }
Each repetition of that rule is a sequence, so the new checkpoint/clear-snapshot pair now runs once per character of every string literal. That rule alone went from 194.6 µs (26.4%) to 284.9 µs (30.9%) of the benchmark; the rest of the cost is spread over the other sequence-heavy rules (term, node, skip). The capnp decode paths do not use pest, which is exactly why only the sexpr/*/decode benchmarks moved.
Suggested handling
This is an upstream correctness fix, so there is nothing to fix in this repo — I have not changed anything on the branch. Your options:
- Accept it and acknowledge the regressions on CodSpeed. Note that HUGR's grammar does use
PUSH/POP/PEEK(inraw_symbol_name), so the correctness fix is not purely theoretical for you. - Pin
pestto 2.8.8 if the ~15–29% s-expression decode cost matters more right now, and revisit once upstream optimises the new stack bookkeeping. Worth raising with pest — the per-sequence snapshot is paid by every grammar, even ones that barely touch the stack. - Grammar-side mitigation, if you want the win back regardless of pest version: reducing the number of per-character sequences in the string/identifier rules would cut the dominant half of the cost. Happy to prototype that if useful.
Summary
- Warming up the performance wizard...
- Investigate the sexpr decode regression — Flamegraph diff shows 100% of the slowdown is inside pest's parser state machine.
- Isolate which dependency causes it — Reverting only pest 2.9.0 -> 2.8.8 locally restores performance (-16.9% / -20.0%), matching the reported regressions.
- Explain root cause — Root cause is the pest 2.9.0 stack-restore fix (ci(deps): bump dawidd6/action-download-artifact from 4 to 5 #1184); no repository changes needed.
- Handling comment — Comment handling finished successfully
Was this response helpful? React with 👍 or 👎 to help us improve CodSpeedBot.
|
@dependabot ignore pest minor version |
|
OK, I won't notify you about version 2.9.x of pest again, unless you unignore it. |
|
Looks like these dependencies are updatable in another way, so this is no longer needed. |
Bumps the minor group with 4 updates in the / directory: serde_with, ordered-float, pest and pest_derive.
Updates
serde_withfrom 3.21.0 to 3.22.0Release notes
Sourced from serde_with's releases.
Commits
88f576aBump version to 3.22.0 (#991)931e664Bump version to 3.22.0e26930eBump github/codeql-action from 4.37.3 to 4.37.4 in the github-actions group (...92cd5a0Bump github/codeql-action in the github-actions group32be66fGuard with_capacity_and_hasher against untrusted size_hint (DoS) (#971)33871cdMerge branch 'master' into fix/duplicate-key-impls-capacity-overflowbb1e064Change function position within impl (#968)202d3ddImprove the time unit macros to remove unnecessary repetition and make the co...b347efbMove theuse_duration_signed_ser/*_demacros utils6590545chrono_0_4: Implement the same time unit macro cleanup as jiff_0_2Updates
ordered-floatfrom 5.3.0 to 5.5.0Release notes
Sourced from ordered-float's releases.
Commits
2d56f3ev5.5.04496ef7feat: derive Facet if facet feature is active2409c9fv5.4.02730f18cargo update015fc41add schemars 1.2 support4b03969refactor schemars related tests424f9acrustfmt51764f1impl_proptest: usecoreinstead ofstd(#180)ccf51f5Add From<OrderedFloat> for OrderedFloat<f64> (#183)Updates
pestfrom 2.8.8 to 2.9.0Release notes
Sourced from pest's releases.
Commits
d9b29b6bump version to 2.9.0 (#1192)f0998eeReject unescaped control characters in the JSON grammar (#1190)fa9e187Add fuzzing dictionaries and document them in FUZZING.md (#1191)c3a6956Add support for a fully-functional const PrattParser with optional macro for ...6f29d56fix(fuzz): set edition 2021 and add sql fuzz target (#1189)4614db3fix(debugger): upgrade rustyline to 13 for loongarch64 support (#1187)f95efcdfix: silence compiler and clippy warnings in tests and generator (#1186)0f501a1fix: restore stack state after a failed sequence (#1184)Updates
pest_derivefrom 2.8.8 to 2.9.0Release notes
Sourced from pest_derive's releases.
Commits
d9b29b6bump version to 2.9.0 (#1192)f0998eeReject unescaped control characters in the JSON grammar (#1190)fa9e187Add fuzzing dictionaries and document them in FUZZING.md (#1191)c3a6956Add support for a fully-functional const PrattParser with optional macro for ...6f29d56fix(fuzz): set edition 2021 and add sql fuzz target (#1189)4614db3fix(debugger): upgrade rustyline to 13 for loongarch64 support (#1187)f95efcdfix: silence compiler and clippy warnings in tests and generator (#1186)0f501a1fix: restore stack state after a failed sequence (#1184)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore <dependency name> major versionwill close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)@dependabot ignore <dependency name> minor versionwill close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)@dependabot ignore <dependency name>will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)@dependabot unignore <dependency name>will remove all of the ignore conditions of the specified dependency@dependabot unignore <dependency name> <ignore condition>will remove the ignore condition of the specified dependency and ignore conditions