Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(435)

Issue 87063: Remove or delay imports to improve startup time

Can't Edit
Can't Publish+Mail
Start Review
Created:
16 years, 6 months ago by Collin Winter
Modified:
16 years, 6 months ago
CC:
unladen-swallow_googlegroups.com, nnorwitz
Base URL:
http://unladen-swallow.googlecode.com/svn/trunk/
Visibility:
Public.

Description

This eliminates the regression in normal startup time vs 2009Q1, though doesn't fix the regression in statup_nosite. There's a lot more headroom (see the comment in site.py), but that will take a slightly more involved fix. trunk vs patch (default options; perf.py -r) normal_startup: Min: 0.435643 -> 0.319087: 36.53% faster Avg: 0.459272 -> 0.331541: 38.53% faster Significant (t=51.009351, a=0.95) Stddev: 0.02377 -> 0.00787: 202.25% smaller 2009Q1 vs patch (default options; perf.py -r) normal_startup: Min: 0.381866 -> 0.317074: 20.43% faster Avg: 0.402331 -> 0.331774: 21.27% faster Significant (t=20.677263, a=0.95) Stddev: 0.02758 -> 0.02009: 37.30% smaller trunk vs patch (-O2 -j always; n=5) normal_startup: Min: 15.735776 -> 11.112612: 41.60% faster Avg: 15.795877 -> 11.144470: 41.74% faster Significant (t=151.105242, a=0.95) Stddev: 0.05690 -> 0.03873: 46.93% smaller

Patch Set 1 #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -54 lines) Patch
M Lib/copy_reg.py View 1 chunk +4 lines, -1 line 0 comments Download
M Lib/distutils/dep_util.py View 2 chunks +2 lines, -1 line 0 comments Download
M Lib/distutils/sysconfig.py View 9 chunks +8 lines, -6 lines 2 comments Download
M Lib/distutils/text_file.py View 9 chunks +14 lines, -15 lines 0 comments Download
M Lib/distutils/util.py View 13 chunks +27 lines, -19 lines 0 comments Download
M Lib/os.py View 4 chunks +7 lines, -11 lines 6 comments Download
M Lib/posixpath.py View 2 chunks +1 line, -1 line 0 comments Download
M Lib/site.py View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 4
Collin Winter
PTAL
16 years, 6 months ago (2009-06-25 17:14:14 UTC) #1
Jeffrey Yasskin
LGTM. You should probably try to push this upstream. http://codereview.appspot.com/87063/diff/1/7 File Lib/distutils/sysconfig.py (right): http://codereview.appspot.com/87063/diff/1/7#newcode95 Line ...
16 years, 6 months ago (2009-06-25 17:59:54 UTC) #2
Collin Winter
http://codereview.appspot.com/87063/diff/1/7 File Lib/distutils/sysconfig.py (right): http://codereview.appspot.com/87063/diff/1/7#newcode95 Line 95: from distutils.errors import DistutilsPlatformError On 2009/06/25 17:59:54, Jeffrey ...
16 years, 6 months ago (2009-06-25 18:03:41 UTC) #3
James Abbatiello
16 years, 6 months ago (2009-06-25 19:06:50 UTC) #4
http://codereview.appspot.com/87063/diff/1/4
File Lib/os.py (right):

http://codereview.appspot.com/87063/diff/1/4#newcode465
Line 465: class _Environ(dict):
Does this cause problems as mentioned in
http://bugs.python.org/issue2144 or
http://bugs.python.org/issue1367711 ?

http://codereview.appspot.com/87063/diff/1/4#newcode496
Line 496: del self[key]
This calls unsetenv twice for each key
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b