[Checkins] SVN: zc.buildout/trunk/ Apply iElectric (Domen Ko?\197?\190ar) patch

J. Alexander Clark cvs-admin at zope.org
Mon Aug 13 20:38:22 UTC 2012


Log message for revision 127507:
  Apply iElectric (Domen Ko?\197?\190ar) patch
  

Changed:
  U   zc.buildout/trunk/CHANGES.txt
  U   zc.buildout/trunk/src/zc/buildout/easy_install.py
  U   zc.buildout/trunk/src/zc/buildout/tests.py

-=-
Modified: zc.buildout/trunk/CHANGES.txt
===================================================================
--- zc.buildout/trunk/CHANGES.txt	2012-08-13 15:53:39 UTC (rev 127506)
+++ zc.buildout/trunk/CHANGES.txt	2012-08-13 20:38:17 UTC (rev 127507)
@@ -25,6 +25,17 @@
 - Made sure to download extended configuration files only once per buildout
   run even if they are referenced multiple times (patch by Rafael Monnerat).
 
+- Ported speedup optimization patch by Ross Patterson to 1.5.x series.
+  Improved patch to calculate required_by packages in linear time
+  in verbose mode (-v). Running relatively simple Buildout envornment
+  yielded in running time improvement from 30 seconds to 10 seconds.
+  (Domen Kožar, Ross Patterson)
+
+- Removed unnecessary pyc recompilation with optimization flags. Running
+  Buildout with pre-downloaded ~300 packages that were installed in empty
+  eggs repository yielded in running time improvement from 1126 seconds
+  to 348 seconds. (Domen Kožar)
+
 Bugs fixed:
 
 - In the download module, fixed the handling of directories that are pointed

Modified: zc.buildout/trunk/src/zc/buildout/easy_install.py
===================================================================
--- zc.buildout/trunk/src/zc/buildout/easy_install.py	2012-08-13 15:53:39 UTC (rev 127506)
+++ zc.buildout/trunk/src/zc/buildout/easy_install.py	2012-08-13 20:38:17 UTC (rev 127507)
@@ -1850,8 +1850,9 @@
         return "Couldn't find a distribution for %r." % str(req)
 
 def _log_requirement(ws, req):
-    ws = list(ws)
-    ws.sort()
+    if not logger.isEnabledFor(logging.DEBUG):
+        return
+
     for dist in ws:
         if req in dist.requires():
             logger.debug("  required by %s." % dist)
@@ -1896,15 +1897,3 @@
                 py_compile.compile(filepath)
             except py_compile.PyCompileError:
                 logger.warning("Couldn't compile %s", filepath)
-            else:
-                # Recompile under other optimization. :)
-                args = [_safe_arg(sys.executable)]
-                if __debug__:
-                    args.append('-O')
-                args.extend(['-m', 'py_compile', _safe_arg(filepath)])
-
-                if is_jython:
-                    subprocess.call([sys.executable, args])
-                else:
-                    os.spawnv(os.P_WAIT, sys.executable, args)
-

Modified: zc.buildout/trunk/src/zc/buildout/tests.py
===================================================================
--- zc.buildout/trunk/src/zc/buildout/tests.py	2012-08-13 15:53:39 UTC (rev 127506)
+++ zc.buildout/trunk/src/zc/buildout/tests.py	2012-08-13 20:38:17 UTC (rev 127507)
@@ -2822,14 +2822,14 @@
     We have a develop egg: pack3 0.0.0
     Getting required 'pack2'
       required by pack0 0.0.0.
-      required by pack3 0.0.0.
       required by pack4 0.0.0.
+      required by pack3 0.0.0.
     We have a develop egg: pack2 0.0.0
     Getting required 'pack1'
       required by pack0 0.0.0.
-      required by pack2 0.0.0.
-      required by pack3 0.0.0.
       required by pack4 0.0.0.
+      required by pack3 0.0.0.
+      required by pack2 0.0.0.
     We have a develop egg: pack1 0.0.0
     Getting required 'pack5'
       required by pack4 0.0.0.
@@ -3345,7 +3345,7 @@
 
     """
 
-def pyc_and_pyo_files_have_correct_paths():
+def pyc_files_have_correct_paths():
     r"""
 
     >>> write('buildout.cfg',
@@ -3381,7 +3381,6 @@
     d  EGG-INFO
     -  eggrecipedemoneeded.py
     -  eggrecipedemoneeded.pyc
-    -  eggrecipedemoneeded.pyo
 
     """
 



More information about the checkins mailing list