Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

speed up python tracer with frame.f_trace_lines = False #1381

Merged
merged 1 commit into from May 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions coverage/pytracer.py
Expand Up @@ -159,6 +159,8 @@ def _trace(self, frame, event, arg_unused):
if tracename not in self.data:
self.data[tracename] = set()
self.cur_file_data = self.data[tracename]
else:
frame.f_trace_lines = False
# The call event is really a "start frame" event, and happens for
# function calls and re-entering generators. The f_lasti field is
# -1 for calls, and a real offset for generators. Use <0 as the
Expand Down