What problem does it solve? Performance-sensitive Python 2.7 code in NetEase MC Mod runtimes often suffers from frame drops and slow tick processing caused by exception abuse, repeated deep imports, inefficient branching, and redundant FFI calls. This Skill provides a structured review checklist and six targeted optimization guides to eliminate these hot-path bottlenecks. ## Core Features & Use Cases - Six Optimization Domains: Covers exception handling, dynamic imports, conditional branching, hash lookups, next() iteration, and FFI caching, each with a dedicated reference document. - Quick Decision Table: Maps symptoms like try/except in tick loops or string-concatenated dict keys directly to the relevant optimization guide. - Benchmark-Backed Guidance: Includes measured Python 2.7 timings (e.g., cached imports dropping from 3.105s to 0.578s per 10M calls) to validate each technique. - Use Case: When a mod's tick callback causes frame rate drops while iterating thousands of entities, use this Skill to identify exception-driven control flow and replace it with explicit checks plus event-driven FFI caching. ## Quick Start Ask the AI to review your tick callback or high-frequency event handler for Python 2.7 performance issues using this optimization guide.