ruby / ruby/tracer

TracePoint is slow

Open
#18 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
95
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Is there any way to have TracePoint do the path matching, instead of:

https://github.com/ruby/tracer/blob/master/lib/tracer/base.rb#L144

Then it would be at the VM level, which should provide a performance increase.

Could be achieved with a C extension?

Otherwise, you're throwing away 99% of the method calls that aren't application-level, and it makes for incredibly slow tracing.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the path-matching code at lib/tracer/base.rb#L144 and reviewing how TracePoint currently handles events. Determine whether path filtering can move to the VM or a C extension, then measure tracing overhead and confirm that application-level traces remain correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
devtools, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.