summaryrefslogtreecommitdiff
path: root/gr-utils
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-02-03 17:01:32 +0100
committerMartin Braun <martin.braun@ettus.com>2018-02-03 17:01:32 +0100
commit57643cfa82184652cff56d91294d3b6f6b3dc96f (patch)
treeaed43f837e8031311451d251b3bc8594af343b4e /gr-utils
parentdb7e26bc73fd71bc88249131f57f7edef308fa63 (diff)
modtool: Replace globals().values() with ModTool.__subclasses__()
Effectively reapplies this commit by Marcus Müller: ``` Making gr_modtool start faster by avoiding to iterate over all globals All subclasses of object have a __subclasses__ method, which gives the subclasses. That's a lot fewer objects than what's in globals(). ```
Diffstat (limited to 'gr-utils')
-rwxr-xr-xgr-utils/python/utils/gr_modtool2
1 files changed, 1 insertions, 1 deletions
diff --git a/gr-utils/python/utils/gr_modtool b/gr-utils/python/utils/gr_modtool
index d9016840be..7d035a6590 100755
--- a/gr-utils/python/utils/gr_modtool
+++ b/gr-utils/python/utils/gr_modtool
@@ -25,7 +25,7 @@ from gnuradio.modtool import *
def setup_parser():
- modules = get_modtool_modules(globals().values())
+ modules = get_modtool_modules(ModTool.__subclasses__())
parser = ModTool.get_parser()
subparsers = parser.add_subparsers(title="Commands")
epilog = []