diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-02-03 17:01:32 +0100 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-02-03 17:01:32 +0100 |
commit | 57643cfa82184652cff56d91294d3b6f6b3dc96f (patch) | |
tree | aed43f837e8031311451d251b3bc8594af343b4e /gr-utils | |
parent | db7e26bc73fd71bc88249131f57f7edef308fa63 (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-x | gr-utils/python/utils/gr_modtool | 2 |
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 = [] |