]> granicus.if.org Git - python/commit
bpo-35941: Fix performance regression in new code (GH-12610)
authorChristian Heimes <christian@python.org>
Mon, 9 Sep 2019 16:06:55 +0000 (18:06 +0200)
committerSteve Dower <steve.dower@python.org>
Mon, 9 Sep 2019 16:06:55 +0000 (09:06 -0700)
commit915cd3f0696cb8a7206754a8fc34d4cd865a1b4a
treed5dd29a1c76f1ac11ac6a20dc47ccb7faf680200
parent09090d04ef8d2f4c94157b852d3d530a51e13d22
bpo-35941: Fix performance regression in new code (GH-12610)

Accumulate certificates in a set instead of doing a costly list contain
operation. A Windows cert store can easily contain over hundred
certificates. The old code would result in way over 5,000 comparison
operations

Signed-off-by: Christian Heimes <christian@python.org>
Lib/test/test_ssl.py
Modules/_ssl.c