Closed TheTechromancer closed 2 weeks ago
The ppid_map() call takes indeed a long time, but with this report alone it's impossible to tell why. Ticket is 6 months old so I assume you can no longer reproduce this issue, correct? If that's the case then please close it.
Yes; sadly I wasn't able to reproduce this in isolation. Closing for now.
Summary
Description
Hi, first off thanks for making this library; it's very useful. Recently I've been running into an issue on Linux where calls to
Process.children(recursive=True)
take up more CPU than expected.As you can see from the cProfile output, the call takes roughly 8 seconds of CPU time. This is strange because there are only a few subprocesses (five or less). The program is using asyncio, so there are quite a few active asyncio tasks; but these should all exist within the same thread.
It appears the real culprit here is
_pslinux.py
/ppid_map()
:Here is the python code that calls it: