major-domo-v2/utils
Cal Corum a3e63f730f perf: cache inspect.signature() at decoration time (#97)
Move inspect.signature(func) calls from inside wrapper functions to the
outer decorator function so the introspection cost is paid once at
decoration time instead of on every invocation.

- logged_command: sig, param_names, and exclude_set computed at decoration time;
  wrapper.__signature__ reuses the pre-computed sig
- cached_api_call: sig moved to decorator scope; bound_args still computed
  per-call (requires runtime args)
- cached_single_item: same as cached_api_call

Closes #97

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 17:45:06 +00:00
..
__init__.py CLAUDE: Initial commit for discord-app-v2 rebuild 2025-08-15 00:04:50 -05:00
autocomplete.py perf: cache user team lookup in player_autocomplete, reduce limit to 25 2026-03-20 08:34:32 -05:00
cache.py perf: replace Redis KEYS with SCAN in clear_prefix (#98) 2026-03-20 09:02:22 -05:00
CLAUDE.md CLAUDE: Refactor dice rolling into reusable utility module and add /d20 command 2025-10-29 01:15:11 -05:00
decorators.py perf: cache inspect.signature() at decoration time (#97) 2026-03-20 17:45:06 +00:00
dice_utils.py CLAUDE: Refactor dice rolling into reusable utility module and add /d20 command 2025-10-29 01:15:11 -05:00
discord_helpers.py refactor: move 42 unnecessary lazy imports to top-level across codebase 2026-03-02 13:35:23 -06:00
draft_helpers.py refactor: move 42 unnecessary lazy imports to top-level across codebase 2026-03-02 13:35:23 -06:00
helpers.py fix: remove 226 unused imports across the codebase (closes #33) 2026-02-20 11:35:04 -06:00
injury_log.py fix: remove 226 unused imports across the codebase (closes #33) 2026-02-20 11:35:04 -06:00
listeners.py Refactored listener logic and added SpoilerListener 2025-10-22 14:59:19 -05:00
logging.py perf: replace json.dumps serialization test with isinstance fast path (#96) 2026-03-20 12:32:34 -05:00
mentions.py Fix custom command mentions not triggering notifications 2026-01-28 15:45:38 -06:00
permissions_examples.py CLAUDE: Add flexible permission system for multi-server support 2025-11-06 11:29:29 -06:00
permissions.py feat: add is_admin() helper to utils/permissions.py (#55) 2026-03-09 09:37:22 -05:00
random_gen.py fix: remove 226 unused imports across the codebase (closes #33) 2026-02-20 11:35:04 -06:00
scorebug_helpers.py fix: scorebug stale data, win probability parsing, and read-failure tolerance (closes #39, #40) 2026-02-20 14:14:23 -06:00
team_utils.py Consolidate season config variables to single source (v2.21.0) 2025-12-02 16:12:16 -06:00
text_utils.py CLAUDE: Add smart text splitting for Discord embed fields 2025-10-21 14:46:24 -05:00
timezone.py fix: use explicit America/Chicago timezone for freeze/thaw scheduling 2026-02-22 16:00:22 -06:00
transaction_logging.py fix: remove 226 unused imports across the codebase (closes #33) 2026-02-20 11:35:04 -06:00