Understand the mypyc compilation plan for Camelot
masterCamelot plans to use mypyc to ship compiled hot-path modules (specifically camelot/utils.py) in pre-built wheels to improve performance.
Key details of the implementation model:
- Default Behavior: When installing via
pip install camelot-pyon supported platforms, you will receive a pre-built wheel containing the compiledutils.py(as.soor.pydfiles) with no extra build dependencies. - Fallback: On exotic platforms where a pre-built wheel is unavailable,
pipwill install from the source distribution (sdist), which remains pure-Python and requires no build dependencies. - Performance Impact: Compiling
camelot/utils.pyis expected to provide a 2-3× speedup on stream/network parse paths compared to the pure-Python version. - Limitations: Core classes (like
Table) and parsers are not compiled due to dynamic attribute usage and**kwargsconstraints in mypyc.