Skip to main content

No project description provided

Project description

Textual Speedups

Optional Rust speedups for Textual.

This module implements some of Textual's classes in Rust, which should make Textual apps faster. It is currently experimental, and shouldn't be used in production.

How to use

To use textual-speedups, install it in to the same environment as your Textual app:

pip install textual-speedups

Then run your Textual app with the environment variable TEXTUAL_SPEEDUPS=1. For example:

TEXTUAL_SPEEDUPS=1 python -m textual

The environment variable is there to discourage use in production. In the future, when I am more confident in stability then the environment variable will be used to opt-out of the Rust speedups.

What is faster?

Currently, the classes in geometry.py have a Rust implementation. This includes Offset, Size, Region, and Spacing.

How much faster?

That is yet to be determined. A little profiling suggests that pretty much all methods are several of magnitude faster than the pure-Python versions. This should add up to a respectable improvement, but until I've written a benchmark tool I won't be able to quantify that.

Bugs?

All tests pass with speedups enabled, and every app I have tested it against. However, it is possibly (even likely) there are edge cases remaining which may result in crashes or subtle differences.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

textual_speedups-0.2.0.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

textual_speedups-0.2.0-cp313-cp313-macosx_11_0_arm64.whl (244.7 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

File details

Details for the file textual_speedups-0.2.0.tar.gz.

File metadata

  • Download URL: textual_speedups-0.2.0.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.6

File hashes

Hashes for textual_speedups-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e9e045e94b7daff79917f4fc699c6d99db6005559298929141d68a1293c3cc6d
MD5 558ad09cbcdf54611be6136d7f8ce808
BLAKE2b-256 adfa979584993986defcf788e25ef46e2fe19a510ffe4aaabc5e706759e080c4

See more details on using hashes here.

File details

Details for the file textual_speedups-0.2.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for textual_speedups-0.2.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ca81a27e7c6f65a342fb827cbc84a67166a879ea79bf06fa222d5fb96f8c557f
MD5 712bed2e7532c74a88104a310600fa55
BLAKE2b-256 2aff4e77ef334db7017036b284ba890665f1e29fb344549eca66be5db7464a24

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page