Skip to content

Commit

Permalink
Merge pull request #20 from twosigma/reduce-symbolic-traceback-depth
Browse files Browse the repository at this point in the history
reduced symbolic traceback depth for performance reasons
  • Loading branch information
daniel-shields authored Oct 11, 2023
2 parents 6b43e50 + 99427aa commit 28b374a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/uberjob/_util/traceback.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __repr__(self):
TruncatedStackFrame = TruncatedStackFrameType()


MAX_TRACEBACK_DEPTH = 15
MAX_TRACEBACK_DEPTH = 3


def get_stack_frame(initial_depth=2):
Expand All @@ -73,9 +73,8 @@ def recurse(frame, depth):
)

initial_frame = inspect.currentframe()
while initial_depth:
for _ in range(initial_depth):
initial_frame = initial_frame.f_back
initial_depth -= 1
return recurse(initial_frame, MAX_TRACEBACK_DEPTH)


Expand Down

0 comments on commit 28b374a

Please sign in to comment.