comparison 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
comparison
equal deleted inserted replaced
612:9cd745437269 613:5374955ec5b1
3 # Copyright 2005 Matt Mackall <mpm@selenic.com> 3 # Copyright 2005 Matt Mackall <mpm@selenic.com>
4 # 4 #
5 # This software may be used and distributed according to the terms 5 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference. 6 # of the GNU General Public License, incorporated herein by reference.
7 7
8 import os, sys, re, ConfigParser, util 8 import os, ConfigParser
9 from demandload import *
10 demandload(globals(), "re socket sys util")
9 11
10 class ui: 12 class ui:
11 def __init__(self, verbose=False, debug=False, quiet=False, 13 def __init__(self, verbose=False, debug=False, quiet=False,
12 interactive=True): 14 interactive=True):
13 self.cdata = ConfigParser.SafeConfigParser() 15 self.cdata = ConfigParser.SafeConfigParser()