Whoosh search library gains real multi-core speed on Python's new no-GIL build
Python 3.14 introduced an officially supported free-threaded (no-GIL) build, allowing pure-Python code to run CPU-bound tasks across multiple cores simultaneously. The Whoosh full-text search library can now exploit this by splitting document collections into shards, with each worker thread independently building its own sub-index. Once all threads complete, a main thread merges the sub-indexes into a single standard Whoosh index using the add_reader() method. Developers must follow a strict concurrency rule: IndexWriter must never be shared between threads, while Schema and IndexReader objects are safe to share. On standard GIL-enabled Python builds, the parallel approach offers no speed benefit and may be slightly slower due to merge overhead.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in