> I've got a plan, which I'll implement today unless someone can find a > hole in it. The warnings module stores 5-tuples of filter information, > including two compiled regular expressions. There are two filters > installed by default, which is why we load re during startup. > > The two default filters use the regular expression "". So we're getting > absolutely no benefit from those regular expressions. I propose to > modify the two regex slots in the filter tuple to also store None, where > None means matching anything. > > If we make that change, then we can install the default filters without > importing re. A quick test of this change improved startup time by 20%. It seems you already implemented this; I approve (though I hope some other folks will carefully review the changes to warnings.py, which are a bit more extensive than I feel comfortable with this close to a release). > Unfortunately, even with a 20% boost, it still takes twice as long to do > python -c "pass". There's a little time for more research into this. --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4