This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Please consider integrating performance fix for ipaddress.py
Type: performance Stage: resolved
Components: Library (Lib) Versions: Python 3.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: Alexander Finkel, SilentGhost, ncoghlan, pmoody, serhiy.storchaka
Priority: normal Keywords:

Created on 2015-12-02 17:54 by Alexander Finkel, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (4)
msg255741 - (view) Author: Alexander Finkel (Alexander Finkel) Date: 2015-12-02 17:54
I encountered a performance problem using the ipaddr library to merge over 10000 network addresses. I sent a patch upstream to fix it, and that patch has been merged:
https://github.com/google/ipaddr-py/commit/6504b47a02739e853043f0a184f3c39462293e5c

Since ipaddr is also included in the standard lib of Python 3 (I think since version 3.3?) and above, I'd like to ask that this patch be considered for committing here too.

Background on including ipaddr into the std lib: https://bugs.python.org/issue14814
msg255743 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-12-02 18:02
Could you provide a patch?
msg255750 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2015-12-02 18:44
Perhaps I'm wrong, but a superficial inspection of the ipaddress.py seem to indicate that it's not affected by the same issue. _find_address_range is implemented as a generator, it doesn't restart comparison on every iteration. Alexander, did you experience any performance issues when using ipaddress module from standard library?
msg255791 - (view) Author: Alexander Finkel (Alexander Finkel) Date: 2015-12-02 22:09
Thanks for the responses.

I'm afraid I was looking at the Python 3.3 source code on my desktop, it looks like the problem was fixed in the Mercurial repo about 10 months ago by https://hg.python.org/cpython/rev/f7508a176a09

Marked this issue as a duplicate? Feel free to change the resolution if that isn't right.

Cheers,

Alex
History
Date User Action Args
2022-04-11 14:58:24adminsetgithub: 69970
2015-12-02 22:33:13serhiy.storchakasetresolution: duplicate -> out of date
stage: resolved
2015-12-02 22:09:22Alexander Finkelsetstatus: open -> closed
resolution: duplicate
messages: + msg255791
2015-12-02 18:44:17SilentGhostsetnosy: + SilentGhost
messages: + msg255750
2015-12-02 18:02:57serhiy.storchakasetversions: + Python 3.6
nosy: + pmoody, serhiy.storchaka, ncoghlan

messages: + msg255743

components: + Library (Lib)
type: performance
2015-12-02 17:54:16Alexander Finkelcreate