Skip to content

sentry_set_context opens file handles resulting in hitches #1395

@jeremy-wildlight

Description

@jeremy-wildlight

Description

System profiling demonstrates that sentry_set_context can easily take 300 to 800 ms in a frame, depending on OS environmental factors because internally, the function appears to create file handles (which also touches USN journal state and so on).

In the context of a single-process crash collection workflow, is this file lock needed? It would be preferable to have a mode of operation where this file was just created once or ideally not at all.

When does the problem happen

  • During build
  • During run-time
  • When capturing a hard crash

Environment

  • OS: Windows 10/11 64-bit
  • Compiler: Clang 18.1.8

Steps To Reproduce

Run any game and attempt to call sentry_set_context every frame.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions