Skip to content

The default imports in __init__ causes significant lag #369

@anselor

Description

@anselor

I have a module where I hijack argcomplete's bash completion and tie it into the completion function provided by AutoCompleter. Since AutoCompleter is a part of Cmd2 and __init__ imports Cmd and a bunch of other things, it causes about half a second lag on my machine to perform tab completion in bash. If I comment out all of the imports in __init__ there is no noticeable lag.

Since the next release is going to have a number of big changes anyway, I'm proposing we take out the default imports and force everyone to update their code to import from cmd2.cmd2. What do you guys think?

@tleonhardt @kmvanbrunt @kotfu

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions