Skip to content

WIP: perf(crashpad): replace scope flushing with incremental IPC updates#1840

Open
jpnurmi wants to merge 14 commits into
jpnurmi/feat/scope-observerfrom
jpnurmi/feat/crashpad-ipx
Open

WIP: perf(crashpad): replace scope flushing with incremental IPC updates#1840
jpnurmi wants to merge 14 commits into
jpnurmi/feat/scope-observerfrom
jpnurmi/feat/crashpad-ipx

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Warning

WIP    🚧🔨⏳⛔

The Crashpad backend now writes a small initial __sentry-event and mirrors scope changes to the Crashpad handler as MessagePack updates. This avoids rewriting the full event and external crash report on every scope mutation, which is especially expensive on Windows.

Function Iterations Before* (ms) After* (ms)
sentry_set_tag 1000 5.839 +/- 4.564 [1.445..49.623] 0.135 +/- 0.032 [0.074..0.319]
sentry_add_breadcrumb 1000 0.365 +/- 1.243 [0.183..39.475] 0.119 +/- 0.028 [0.052..0.253]

*) avg +/- stddev [min..max]

Breadcrumbs and attachments are sent through the new scope observer path while preserving the existing breadcrumb rotation. Crash events are still assembled as __sentry-event; Crashpad merges the accumulated handler-side scope state when the report is written.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

### Features

- replace scope flushing with incremental IPC updates ([#1840](https://github.com/getsentry/sentry-native/pull/1840))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description or adding a skip-changelog label.

Generated by 🚫 dangerJS against 1f4e5fc

Comment thread src/backends/sentry_backend_crashpad.cpp Outdated
Comment thread src/backends/sentry_backend_crashpad.cpp
Comment thread src/backends/sentry_backend_crashpad.cpp
Comment thread src/backends/sentry_backend_crashpad.cpp Outdated
Comment thread src/backends/sentry_backend_crashpad.cpp
Comment thread src/backends/sentry_backend_crashpad.cpp Outdated
@jpnurmi jpnurmi changed the title WIP: ref(crashpad): replace scope flushing with incremental IPC updates WIP: perf(crashpad): replace scope flushing with incremental IPC updates Jul 3, 2026
Comment thread src/backends/sentry_backend_crashpad.cpp Outdated
Comment thread src/backends/sentry_backend_crashpad.cpp
Comment thread src/backends/sentry_backend_crashpad.cpp
Comment thread src/backends/sentry_backend_crashpad.cpp Outdated
Comment thread src/backends/sentry_backend_crashpad.cpp Outdated
Comment thread src/backends/sentry_backend_crashpad.cpp Outdated
@jpnurmi jpnurmi force-pushed the jpnurmi/feat/crashpad-ipx branch from fe2cef2 to e86dc4c Compare July 4, 2026 12:56
Comment thread src/backends/sentry_backend_crashpad.cpp
Comment thread src/backends/sentry_backend_crashpad.cpp

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8f67bc1. Configure here.

Comment thread src/backends/sentry_backend_crashpad.cpp
@jpnurmi jpnurmi force-pushed the jpnurmi/feat/crashpad-ipx branch from 8f67bc1 to 1f4e5fc Compare July 4, 2026 19:57
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.

1 participant