Message413364
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? |
|
Date |
User |
Action |
Args |
2022-02-16 22:58:31 | slingamn | set | recipients:
+ slingamn, christian.heimes |
2022-02-16 22:58:31 | slingamn | set | messageid: <1645052311.07.0.510066593594.issue46750@roundup.psfhosted.org> |
2022-02-16 22:58:31 | slingamn | link | issue46750 messages |
2022-02-16 22:58:30 | slingamn | create | |
|