Shivaram Lingamneni <sling...@cs.stanford.edu> added the comment:
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: ```python import time start = time.time() 'a'.encode('idna') print(time.time() - start) ``` and for memory: ```python import os def rss(): os.system('grep VmRSS /proc/' + str(os.getpid()) + '/status') rss() 'a'.encode('idna') rss() ``` Are there potential changes to this patch that would mitigate your concerns? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46750> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com