Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xl/trax: search_tracks: remove time.sleep(0) (#844)
When processing the tracks in `search_tracks` generator, do not explicitly yield the current thread's time-slice via `time.sleep(0)`. Removal of sleep call prevents unnecessary slow-downs in the main thread, where we want to finish the operation as fast as possible (especially under python 3.11 on linux, where `time.sleep(0)` introduced additional overhead). The comment accompanying the sleep call refers to GIL behavior, which might have been applicable in python2-era, but does not seem to be applicable to python3 anymore.
- Loading branch information