注释(计费): 记录会员目录重建暂不缓存的原因

runtime_profile_membership_plan_catalog 加 TODO,说明每次重建只有 5 行、开销可忽略

按作者意见标记 wont fix,暂不改 LazyLock / &'static 缓存

Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
2026-10-02 20:06:07 +08:00
parent 51c5784c46
commit bc3d8dc7da
@@ -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<RuntimeProfileMembershipPlanRecord> {
// TODO(membership-catalog): 每次解析都重建目录并重新分配每行字符串(maybe too many cp),
// 但只有 5 行、开销可忽略,按作者意见暂不修复(wont fix,评审第 10 项)。
use RuntimeProfileMembershipModelAccess::{Basic, Full};
use RuntimeProfileMembershipPlan::{Max, Normal, Plus, Pro, Starter};