From 3e9e6de3c26698c5fee1836384447aa1a28183d7 Mon Sep 17 00:00:00 2001 From: Jacob Szwejbka Date: Mon, 9 Jun 2025 11:55:01 -0700 Subject: [PATCH] Dont require method loading for meta meta in module api (#11496) Summary: Program load is still required but this is very cheap. Method load is not needed. Differential Revision: D76278890 --- extension/module/module.cpp | 4 ++-- extension/module/module.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extension/module/module.cpp b/extension/module/module.cpp index 11d71d1ae08..721e9e5b89e 100644 --- a/extension/module/module.cpp +++ b/extension/module/module.cpp @@ -229,8 +229,8 @@ runtime::Error Module::load_method( runtime::Result Module::method_meta( const std::string& method_name) { - ET_CHECK_OK_OR_RETURN_ERROR(load_method(method_name)); - return methods_.at(method_name).method->method_meta(); + ET_CHECK_OK_OR_RETURN_ERROR(load()); + return program_->method_meta(method_name.c_str()); } runtime::Result> Module::execute( diff --git a/extension/module/module.h b/extension/module/module.h index 14d5b4294ae..e75d8383115 100644 --- a/extension/module/module.h +++ b/extension/module/module.h @@ -221,7 +221,7 @@ class Module { /** * Get a method metadata struct by method name. - * Loads the program and method if needed. + * Loads the program if needed. * * @param[in] method_name The name of the method to get the metadata for. *