Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

[pull] master from giampaolo:master #57

Merged
merged 7 commits into from
Dec 21, 2023
Merged

Conversation

pull[bot]
Copy link

@pull pull bot commented Dec 21, 2023

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

giampaolo and others added 7 commits December 20, 2023 12:20
Modify psutil.net_connections() to retrieving unnecessary connection types unless explicitly asked. E.g., on an IDLE system with few IPv6 connections this will run around 170% faster:

```
import psutil, time
started = time.monotonic()
for x in range(1000):
    psutil.net_connections("tcp6")
print(f"completed in {(time.monotonic() - started):.4f} secs")
```

Before all connection types (TCP, UDP, UNIX) were retrived internally, even if they were not returned.
@pull pull bot added the ⤵️ pull label Dec 21, 2023
@ddelange ddelange merged commit fbcd240 into ddelange:master Dec 21, 2023
11 of 14 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants