Skip to content

Commit 62a0773

Browse files
Improve processYamlIncludeDirective peformance
1 parent 1887b7e commit 62a0773

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

tesseract_task_composer/core/include/tesseract_task_composer/core/task_composer_plugin_factory.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class TaskComposerPluginFactory
140140
* @brief Load plugins from yaml node
141141
* @param config The config node
142142
*/
143-
void loadConfig(const YAML::Node& config, const tesseract_common::ResourceLocator& locator);
143+
void loadConfig(YAML::Node config, const tesseract_common::ResourceLocator& locator);
144144

145145
/**
146146
* @brief Load plugins from file path
@@ -311,7 +311,7 @@ class TaskComposerPluginFactory
311311
struct Implementation;
312312
std::unique_ptr<Implementation> impl_;
313313

314-
void loadConfig(const YAML::Node& config);
314+
void loadConfig(YAML::Node config);
315315
};
316316
} // namespace tesseract_planning
317317
#endif // TESSERACT_TASK_COMPOSER_TASK_COMPOSER_FACTORY_H

tesseract_task_composer/core/src/task_composer_plugin_factory.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ void TaskComposerPluginFactory::loadConfig(const tesseract_common::TaskComposerP
118118
impl_->task_plugin_info.default_plugin = config.task_plugin_infos.default_plugin;
119119
}
120120

121-
void TaskComposerPluginFactory::loadConfig(const YAML::Node& config)
121+
void TaskComposerPluginFactory::loadConfig(YAML::Node config)
122122
{
123123
if (const YAML::Node& plugin_info = config[tesseract_common::TaskComposerPluginInfo::CONFIG_KEY])
124124
{
@@ -131,9 +131,10 @@ void TaskComposerPluginFactory::loadConfig(const YAML::Node& config)
131131
}
132132
}
133133

134-
void TaskComposerPluginFactory::loadConfig(const YAML::Node& config, const tesseract_common::ResourceLocator& locator)
134+
void TaskComposerPluginFactory::loadConfig(YAML::Node config, const tesseract_common::ResourceLocator& locator)
135135
{
136-
loadConfig(tesseract_common::processYamlIncludeDirective(config, locator));
136+
tesseract_common::processYamlIncludeDirective(config, locator);
137+
loadConfig(config);
137138
}
138139

139140
void TaskComposerPluginFactory::loadConfig(const std::filesystem::path& config,

0 commit comments

Comments
 (0)