StackTable exposes Vernier's (previously internal) method of collecting stacks and frames without making Ruby allocations and returns a single integer representing a unique stack.
The first use of this can be collecting stack indexes which are compatible with the output of Vernier's collectors (ex. to add them to markers). The second is performance.
This is 2-3x faster than using caller_locations, however the biggest gains would be when additional processing is done on the stack in Ruby (ex. filtering or reformatting) which can be avoided because stacks and frames are de-duplicated.
StackTable exposes Vernier's (previously internal) method of collecting stacks and frames without making Ruby allocations and returns a single integer representing a unique stack.
This can later be decoded
The first use of this can be collecting stack indexes which are compatible with the output of Vernier's collectors (ex. to add them to markers). The second is performance.
This is 2-3x faster than using
caller_locations
, however the biggest gains would be when additional processing is done on the stack in Ruby (ex. filtering or reformatting) which can be avoided because stacks and frames are de-duplicated.