[issue1366311] SRE engine should release the GIL when/if possible

Barry A. Warsaw report at bugs.python.org
Fri May 25 13:31:03 EDT 2018


Barry A. Warsaw <barry at python.org> added the comment:

I'm reopening this bug even though it's been long closed and even though the attached patch is no longer relevant.

We recently found a degenerative performance problem with entrypoints and threads.  As the number of threads increases, it becomes increasingly horrible to extract entrypoints.  

https://github.com/takluyver/entrypoints

The problem is that entrypoints uses glob.iglob() to find the .{dist,egg}-info directory.  iglob() uses regexps on a fairly simple pattern.  GIL contention can cause entrypoint discovery with 16 threads to take ~10 seconds for all threads to complete.

We have some test cases that I'll try to attach later, but since my bugs archeology found this bug, I decided to reopen it rather than start with a new bug.

----------
assignee: effbot -> 
components: +Extension Modules -None
keywords:  -patch
nosy: +barry
resolution: rejected -> 
status: closed -> open
title: SRE engine do not release the GIL -> SRE engine should release the GIL when/if possible
versions: +Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue1366311>
_______________________________________


More information about the Python-bugs-list mailing list