Skip to content

Fixes #145 Optimize first call to Backtrace::capture with about 40% - 50%#175

Merged
TethysSvensson merged 4 commits into
rootcause-rs:mainfrom
nicklaswj:nicklas/optimize-backtrace-capture
May 21, 2026
Merged

Fixes #145 Optimize first call to Backtrace::capture with about 40% - 50%#175
TethysSvensson merged 4 commits into
rootcause-rs:mainfrom
nicklaswj:nicklas/optimize-backtrace-capture

Conversation

@nicklaswj
Copy link
Copy Markdown
Contributor

The first call to Backtrace::capture spent about 40% - 50% percent of the time with initializing two regular expression to match library paths.
This PR replaces the use of regex with hand rolled parses instead.

Most of the remaining time in the call is spent in gimli and add2line.

@TethysSvensson TethysSvensson added this pull request to the merge queue May 21, 2026
Merged via the queue into rootcause-rs:main with commit 67c3f2f May 21, 2026
14 checks passed
Kile-Asmussen pushed a commit to Kile-Asmussen/rootcause-work-fork that referenced this pull request May 21, 2026
…th about 40% - 50% (rootcause-rs#175)

* Replace regexs with handrolled parser functions

* Add tests for match_cargo_registry_path and match_std_library_path

* Run cargo clippy

* run cargo fmt
Kile-Asmussen pushed a commit to Kile-Asmussen/rootcause-work-fork that referenced this pull request May 21, 2026
…th about 40% - 50% (rootcause-rs#175)

* Replace regexs with handrolled parser functions

* Add tests for match_cargo_registry_path and match_std_library_path

* Run cargo clippy

* run cargo fmt
Kile-Asmussen pushed a commit to Kile-Asmussen/rootcause-work-fork that referenced this pull request May 21, 2026
…th about 40% - 50% (rootcause-rs#175)

* Replace regexs with handrolled parser functions

* Add tests for match_cargo_registry_path and match_std_library_path

* Run cargo clippy

* run cargo fmt
Kile-Asmussen pushed a commit to Kile-Asmussen/rootcause-work-fork that referenced this pull request May 21, 2026
…th about 40% - 50% (rootcause-rs#175)

* Replace regexs with handrolled parser functions

* Add tests for match_cargo_registry_path and match_std_library_path

* Run cargo clippy

* run cargo fmt
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