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.

Author slingamn
Recipients christian.heimes, slingamn
Date 2022-02-16.22:58:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I wanted to check in about the status of this patch. Here's the case for the patch, as I understand it:

1. It is not a novel optimization, it just consistently applies design decisions that were made previously (RFE #1472176 and bpo-22127).
2. The performance impact of the initial import of encodings.idna and its transitive dependencies is in fact macroscopic relative to the baseline costs of the interpreter: 5 milliseconds to import the modules and 500 KB in increased RSS, relative to baselines of approximately 50 milliseconds to set up and tear down an interpreter and 10 MB in RSS.

Here are the relevant benchmarks, first for time:

import time
start = time.time()
print(time.time() - start)

and for memory:

import os
def rss():
    os.system('grep VmRSS /proc/' + str(os.getpid()) + '/status')

Are there potential changes to this patch that would mitigate your concerns?
Date User Action Args
2022-02-16 22:58:31slingamnsetrecipients: + slingamn, christian.heimes
2022-02-16 22:58:31slingamnsetmessageid: <>
2022-02-16 22:58:31slingamnlinkissue46750 messages
2022-02-16 22:58:30slingamncreate