Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faster Process.children(recursive=True) #1186

Merged
merged 1 commit into from
Dec 2, 2017

Commits on Dec 1, 2017

  1. Faster Process.children(recursive=True)

    Before:
    ```
    $ python -m timeit -s "import psutil; p = psutil.Process()" "list(p.children(recursive=True))"
    10 loops, best of 3: 29.6 msec per loop
    ```
    
    After:
    ```
    $ python -m timeit -s "import psutil; p = psutil.Process()" "list(p.children(recursive=True))"
    100 loops, best of 3: 12.4 msec per loop
    ```
    
    For reference, non-recursive:
    ```
    $ python -m timeit -s "import psutil; p = psutil.Process()" "list(p.children())"
    100 loops, best of 3: 12.2 msec per loop
    ```
    pitrou committed Dec 1, 2017
    Configuration menu
    Copy the full SHA
    9ec295a View commit details
    Browse the repository at this point in the history