The DCmd factory instances are created and registered at VM startup via management_init(). Creation does:
template <class DCmdClass> class DCmdFactoryImpl : public DCmdFactory {
public:
DCmdFactoryImpl(uint32_t flags, bool enabled, bool hidden) :
DCmdFactory(get_num_arguments<DCmdClass>(), flags, enabled, hidden) { }
where get_num_arguments() instantiates the given DCmd to dynamically determine the number of arguments (args and options) that it takes. This should be determined statically as the value is statically known.
Dropping all the unnecessary DCmd creation and cleanup should improve startup.
template <class DCmdClass> class DCmdFactoryImpl : public DCmdFactory {
public:
DCmdFactoryImpl(uint32_t flags, bool enabled, bool hidden) :
DCmdFactory(get_num_arguments<DCmdClass>(), flags, enabled, hidden) { }
where get_num_arguments() instantiates the given DCmd to dynamically determine the number of arguments (args and options) that it takes. This should be determined statically as the value is statically known.
Dropping all the unnecessary DCmd creation and cleanup should improve startup.