Skip to content

perf(native): Sync scope over IPC - #2157

Open
jpnurmi wants to merge 4 commits into
jpnurmi/perf/native-ipcfrom
jpnurmi/perf/native-ipc-sync
Open

jpnurmi wants to merge 4 commits into
jpnurmi/perf/native-ipcfrom
jpnurmi/perf/native-ipc-sync

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Instead of flushing the whole scope/event on disk on every scope change, send an initial scope snapshot and then minimal incremental updates to the crash daemon over IPC.

Keep the latest complete state in daemon memory for crash reports. Discard interrupted messages and preserve crash callback changes through a final event and attachment snapshot.

See the native (purple) lines in related benchmarks:

Untitled

Close: #1834

@jpnurmi
jpnurmi added this pull request to stack #2156 October 2, 2026 06:23

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

Stale Bugbot comment from a previous run.

Comment thread src/backends/native/sentry_crash_ipc.c
Comment thread src/backends/native/sentry_crash_daemon.c
Comment thread src/backends/native/sentry_crash_daemon.c
Comment thread src/sentry_scope.c
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/native-ipc-sync branch from 3628eda to bdf71d5 Compare October 2, 2026 06:40

@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 3 potential issues.

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 bdf71d5. Configure here.

Comment thread src/backends/native/sentry_crash_daemon.c
Comment thread src/sentry_scope.c
Comment thread src/backends/sentry_backend_native.c Outdated
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/native-ipc-sync branch from bdf71d5 to 941bf3b Compare October 2, 2026 06:50
@codecov

codecov Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 73.48993% with 237 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.17%. Comparing base (9a1e3ca) to head (9e953e7).

Additional details and impacted files
@@                     Coverage Diff                     @@
##           jpnurmi/perf/native-ipc    #2157      +/-   ##
===========================================================
+ Coverage                    75.12%   75.17%   +0.05%     
===========================================================
  Files                          104      104              
  Lines                        28269    28829     +560     
  Branches                      5160     5275     +115     
===========================================================
+ Hits                         21237    21673     +436     
- Misses                        5699     5780      +81     
- Partials                      1333     1376      +43     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Instead of flushing the whole scope/event on disk on every scope
change, send an initial scope snapshot and then minimal incremental
updates to the crash daemon over IPC.

Keep the latest complete state in daemon memory for crash reports.
Discard interrupted messages and preserve crash callback changes through
a final event and attachment snapshot.

Close: #1834
Guard trace observer lookup and notification with the existing scope
notification lock so callbacks cannot overlap other scope notifications.

Cover notification serialization and concurrent scope reads in a
regression test.
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/native-ipc-sync branch from 9e953e7 to 9f80d41 Compare October 2, 2026 14:05

This branch has not been deployed

No deployments
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.

Native: use IPC instead of flushing to disk where possible

1 participant