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.

classification
Title: 'os' patch to speed up import (and python startup)
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: loewis, nbastin
Priority: normal Keywords: patch

Created on 2004-03-25 16:18 by nbastin, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
os.patch nbastin, 2004-03-25 16:18
Messages (3)
msg45667 - (view) Author: Nick Bastin (nbastin) * (Python committer) Date: 2004-03-25 16:18
This patch changes the _Environ subclass of UserDict to use dict 
instead, which avoids the import of UserDict, save 6-8ms on 
python startup with site.py (~4% improvement).

I tested this on my MacOS X box, but since this code is really only 
used in Win32, someone should test it there.
msg45668 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-03-25 19:32
Logged In: YES 
user_id=21627

The patch is incorrect. dict has no attribute data, and subclassing from 
dict involves many more changes than just changing __setitem__/
__getitem__.
msg45669 - (view) Author: Nick Bastin (nbastin) * (Python committer) Date: 2004-03-25 20:39
Logged In: YES 
user_id=430343

Patch is broken, and not really worth fixing for the performance gain.
History
Date User Action Args
2022-04-11 14:56:03adminsetgithub: 40079
2004-03-25 16:18:24nbastincreate