From bc3d8dc7da24d4673bea284a2fa2c86dbd7c5b82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Fri, 2 Oct 2026 20:06:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E9=87=8A(=E8=AE=A1=E8=B4=B9):=20?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E4=BC=9A=E5=91=98=E7=9B=AE=E5=BD=95=E9=87=8D?= =?UTF-8?q?=E5=BB=BA=E6=9A=82=E4=B8=8D=E7=BC=93=E5=AD=98=E7=9A=84=E5=8E=9F?= =?UTF-8?q?=E5=9B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit runtime_profile_membership_plan_catalog 加 TODO,说明每次重建只有 5 行、开销可忽略 按作者意见标记 wont fix,暂不改 LazyLock / &'static 缓存 Co-authored-by: Junie --- server-rs/crates/module-runtime/src/membership/catalog.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server-rs/crates/module-runtime/src/membership/catalog.rs b/server-rs/crates/module-runtime/src/membership/catalog.rs index 681cf9aa9..d531292c5 100644 --- a/server-rs/crates/module-runtime/src/membership/catalog.rs +++ b/server-rs/crates/module-runtime/src/membership/catalog.rs @@ -62,6 +62,8 @@ pub struct RuntimeProfileMembershipPlanSnapshot { /// [`MEMBERSHIP_UNLIMITED_CONCURRENCY`](crate::MEMBERSHIP_UNLIMITED_CONCURRENCY) 表示「不设上限」。 /// `Normal` 是非会员占位档位,不可购买,因此 `enabled = false`。 pub fn runtime_profile_membership_plan_catalog() -> Vec { + // TODO(membership-catalog): 每次解析都重建目录并重新分配每行字符串(maybe too many cp), + // 但只有 5 行、开销可忽略,按作者意见暂不修复(wont fix,评审第 10 项)。 use RuntimeProfileMembershipModelAccess::{Basic, Full}; use RuntimeProfileMembershipPlan::{Max, Normal, Plus, Pro, Starter};