textual-speedups provides optional Rust-based performance enhancements for the Textual TUI framework. It implements core Textual classes like `Offset`, `Size`, `Region`, and `Spacing` in Rust to potentially make Textual applications faster. Currently at version 0.2.1 (released November 28, 2025), the library is experimental and its development follows the Textual ecosystem, with releases occurring a few times a year.
pip install textual-speedupsVerified import paths — ran on the pinned version, not inferred.
To use textual-speedups, simply install it into the same Python environment as your Textual application. Textual will automatically detect and integrate the speedups. The example above is a standard Textual clock app; installing textual-speedups would potentially optimize its underlying Textual operations without requiring any code changes to the app itself.
Use for development and testing purposes only. Monitor the official Textual and textual-speedups repositories for updates on stability and production readiness.
Thoroughly test your Textual application with textual-speedups enabled. Report any issues to the project's GitHub repository. If unexpected behavior occurs, disable the speedups as a first troubleshooting step.
Benchmarking your specific application is recommended to determine if textual-speedups provides a measurable improvement for your use case. Do not expect universal, dramatic speedups across all Textual apps.
Set the environment variable `TEXTUAL_SPEEDUPS=0` before running your Textual application. Example: `TEXTUAL_SPEEDUPS=0 python -m textual` or `os.environ['TEXTUAL_SPEEDUPS'] = '0'` within Python before app initialization.