Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.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 | 9cd745437269 |
children | 6bff574d639f |
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, re, sys, signal | |
9 import fancyopts, ui, hg, util | |
10 from demandload import * | 8 from demandload import * |
11 demandload(globals(), "mdiff time hgweb traceback random signal") | 9 demandload(globals(), "os re sys signal") |
12 demandload(globals(), "socket errno version") | 10 demandload(globals(), "fancyopts ui hg util") |
11 demandload(globals(), "hgweb mdiff random signal time traceback") | |
12 demandload(globals(), "errno socket version") | |
13 | 13 |
14 class UnknownCommand(Exception): pass | 14 class UnknownCommand(Exception): pass |
15 | 15 |
16 def filterfiles(filters, files): | 16 def filterfiles(filters, files): |
17 l = [ x for x in files if x in filters ] | 17 l = [ x for x in files if x in filters ] |