Why does bzr not use Psyco?<br><br>On a 2GB repository, using psyco.background() reduced the &quot;bzr st&quot; operation from 5 seconds to 4 seconds, an appreciated speedup.<br><br>Below is the quick patch I made; if psyco is installed, it'll use it in the unobtrusive background profiling mode. If it's not installed, the ImportError is caught and we move on. The break-even point is the time it takes to perform the import of psyco (not any longer than importing a plugin).
<br><br>=== modified file 'a/bzr'<br>--- a/bzr<br>+++ b/bzr<br>@@ -17,6 +17,11 @@<br>&nbsp;# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA&nbsp; 02111-1307&nbsp; USA<br>&nbsp;&quot;&quot;&quot;Bazaar-NG -- a free distributed version-control tool&quot;&quot;&quot;
<br>&nbsp;import os, sys<br>+try:<br>+&nbsp;&nbsp;&nbsp; import psyco<br>+&nbsp;&nbsp;&nbsp; psyco.background()<br>+except ImportError: pass<br>+<br>&nbsp;if __doc__ is None:<br>&nbsp;&nbsp;&nbsp;&nbsp; print &quot;bzr does not support python -OO.&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp; sys.exit(2)<br><br>
<br>