Message218630
Some properties on IPv4Address and IPv6Address instantiate one or several network objects each time they are computed. Instead these characteristic networks can be computed once and for all at module import. Patch attached.
(note: the lru_cache() decorator seems to mitigate this in micro-benchmarks, but the common pattern is not to call .is_private on always the same address :-)) |
|
Date |
User |
Action |
Args |
2014-05-15 21:24:38 | pitrou | set | recipients:
+ pitrou, ncoghlan, pmoody, serhiy.storchaka |
2014-05-15 21:24:37 | pitrou | set | messageid: <1400189077.88.0.327979647169.issue21513@psf.upfronthosting.co.za> |
2014-05-15 21:24:37 | pitrou | link | issue21513 messages |
2014-05-15 21:24:37 | pitrou | create | |
|