Skip to content

Conversation

@mattdawkins
Copy link
Member

Summary

  • Gate the LineProfiler decorator on compute_wrapper() behind the BATBOT_PROFILE environment variable (1, true, or yes to enable)
  • Previously, profiling overhead was incurred on every call unconditionally
  • Move line_profiler from runtime to optional dependencies since it is only needed during development

Test plan

  • Run batbot pipeline normally — verify no line_profiler import or profiling output
  • Run with BATBOT_PROFILE=1 batbot pipeline — verify profiling stats are printed
  • Verify pip install . no longer pulls in line_profiler

🤖 Generated with Claude Code

The LineProfiler decorator was always active on compute_wrapper(),
adding overhead on every call. It is now only enabled when the
BATBOT_PROFILE environment variable is set to 1/true/yes.

Moved line_profiler from runtime to optional dependencies since it is
only needed during development profiling.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

1 participant