Skip to content

Commit

Permalink
reduced symbolic traceback depth for performance reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-shields committed Oct 11, 2023
1 parent 17fc24d commit 99427aa
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 99427aa

Please sign in to comment.