Mercurial > public > mercurial-scm > hg-stable
diff mercurial/ui.py @ 613:5374955ec5b1
Demand-load most modules in the commands and ui modules.
# HG changeset patch
# User Bryan O'Sullivan <bos@serpentine.com>
# Node ID 059c6e42fc4221816e26a72bef8cf780891989ca
# Parent d2994b5298fb20f87dc1d4747635b280db3c0526
Demand-load most modules in the commands and ui modules.
This improves response times for a number of simple commands, as the
Python interpreter doesn't end up loading modules that it never uses.
There's less benefit to demand-loading in other modules.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon, 04 Jul 2005 12:16:27 -0800 |
parents | d2994b5298fb |
children | b55a78595ef6 |
line wrap: on
line diff
--- a/mercurial/ui.py Mon Jul 04 12:15:44 2005 -0800 +++ b/mercurial/ui.py Mon Jul 04 12:16:27 2005 -0800 @@ -5,7 +5,9 @@ # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. -import os, sys, re, ConfigParser, util +import os, ConfigParser +from demandload import * +demandload(globals(), "re socket sys util") class ui: def __init__(self, verbose=False, debug=False, quiet=False,