Skip to content

docs(changelog): appstate index-MAC dedup 10× perf win (whatsapp-rust#868) - #332

Closed
jlucaso1 wants to merge 1 commit into
mainfrom
claude/eager-cerf-k4rt9s
Closed

jlucaso1 wants to merge 1 commit into
mainfrom
claude/eager-cerf-k4rt9s

Conversation

@jlucaso1

@jlucaso1 jlucaso1 commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

$(cat <<'EOF'

Summary

  • Adds changelog/2026-06-14-appstate-dedup-sort.mdx documenting the adaptive two-path dedup in collect_unique_index_macs merged in oxidezap/whatsapp-rust#868
  • Registers the new entry at the top of the June 14 section in docs.json

What the source PR changed

collect_unique_index_macs (wacore/src/appstate_sync.rs) deduplicates index MACs before the batched backend lookup. The O(n²) linear scan is now kept only for ≤ 64 mutations; above that an O(n log n) index sort runs instead, cutting resume-sync time at N=1000 from 5,678 µs → 550.8 µs (×10) with no memory regression and only ~4 KB of extra scratch per patch.

No public API, wire, or user-facing behaviour changes — changelog entry only.

Test plan

  • Verify the new .mdx renders correctly in the Mintlify preview
  • Confirm the entry appears at the top of the June 14 changelog section

https://claude.ai/code/session_01NPRJdjNk2v7E3izPccavpF
EOF
)


Generated by Claude Code


Summary by cubic

Add a June 14 changelog entry documenting the adaptive index-MAC dedup in collect_unique_index_macs, and register it in docs.json.
Highlights a 10× speedup at N=1000 (5.7 ms → 550 µs) by switching to a sort path above 64 mutations, with no API or behavior changes.

Written for commit aa9f92a. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Documentation
    • Added new changelog entry documenting recent improvements to app state synchronization.
    • Updated documentation navigation to reflect new changelog entry.

…#868)

Add changelog entry for the adaptive two-path dedup in
collect_unique_index_macs: linear scan stays for ≤64 mutations,
O(n log n) index sort kicks in above that, cutting resume-sync at
N=1000 from 5.7 ms to 550 µs with no memory regression.

https://claude.ai/code/session_01NPRJdjNk2v7E3izPccavpF
@mintlify

mintlify Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
whatsapp-rust 🟢 Ready View Preview Jun 14, 2026, 11:12 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c20846de-9b04-4db5-bdbb-25a9b3f022e0

📥 Commits

Reviewing files that changed from the base of the PR and between a35417b and aa9f92a.

📒 Files selected for processing (2)
  • changelog/2026-06-14-appstate-dedup-sort.mdx
  • docs.json

📝 Walkthrough

Walkthrough

A new changelog entry dated June 14, 2026 is added as an MDX file documenting an adaptive dedup optimization for collect_unique_index_macs in app state sync, including benchmark results and test coverage notes. The entry is registered in the Mintlify docs navigation via docs.json.

Changes

Changelog Entry: appstate dedup sort

Layer / File(s) Summary
Changelog page and docs navigation
changelog/2026-06-14-appstate-dedup-sort.mdx, docs.json
New MDX changelog page describes the adaptive two-path dedup strategy for collect_unique_index_macs (linear scan for ≤64 mutations, index-sort/dedup/reorder pipeline for larger patches), reports ~10× speedup at N=1000, documents dedup_tests coverage, and notes no public API or wire changes. The page is added to the English Changelog navigation in docs.json.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A rabbit sorts MACs with a hop and a bound,
O(n log n) — the fast path is found!
For patches of sixty-four, linear will do,
But bigger ones sort, dedup, reorder anew.
Ten times the speed, and the tests all agree—
No API changes, just pure efficiency! 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: adding a changelog entry for a ~10× performance improvement to the appstate index-MAC deduplication function.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/eager-cerf-k4rt9s

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Tip: cubic could auto-approve low-risk PRs like this, if it thinks it's safe to merge. Learn more

Re-trigger cubic

@jlucaso1 jlucaso1 closed this Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants