Skip to content

Conversation

ko1
Copy link
Collaborator

@ko1 ko1 commented Jul 1, 2022

  • Stop pp when the output exceeds the maximum length
  • Use PP.singleline_pp to disable breaking features

fix #635

This does not solve the problem if the pretty_print consumes
time for example using network connections.

ko1 added 2 commits July 1, 2022 11:32
* Stop `pp` when the output exceed the maximum number
* Use `PP.singleline_pp` to disable breaking features

fix #635

This does not solve the problem if the `pretty_print` consumes
time for example using network connections.
@ko1
Copy link
Collaborator Author

ko1 commented Jul 1, 2022

class C
  def initialize
    @a = ['x'] * 10_000
    @b = ['y'] * 10_000
    @c = ['z'] * 10_000
  end
end

$obj = C.new

def rec0 o = $obj
  a = 0
  binding.b
end


(1..1000).each{|i|
  eval("def rec#{i}(o = $obj) = (a = #{i}; rec#{i-1})\n")
}

rec1000
$ time exe/rdbg  -n target.rb -e 'bt;;c

# before
real    0m7.428s
user    0m7.055s
sys     0m0.154s

# after
real    0m0.799s
user    0m0.504s
sys     0m0.111s

@ko1 ko1 merged commit b8f799f into master Jul 1, 2022
@ko1 ko1 deleted the fix_635 branch July 1, 2022 06:16
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.

Slow backtraces due to inspect of large local variables
1 participant