From 30338ecec4a784518ecf717078c7616b96f5d919 Mon Sep 17 00:00:00 2001 From: lyd123qw2008 <326643467@qq.com> Date: Sun, 1 Mar 2026 14:05:11 +0800 Subject: [PATCH] perf(watcher): remove redundant auth clones in incremental path --- internal/watcher/clients.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/watcher/clients.go b/internal/watcher/clients.go index ae11967b..7c2fd2a8 100644 --- a/internal/watcher/clients.go +++ b/internal/watcher/clients.go @@ -106,7 +106,7 @@ func (w *Watcher) reloadClients(rescanAuth bool, affectedOAuthProviders []string if a == nil || strings.TrimSpace(a.ID) == "" { continue } - pathAuths[a.ID] = a.Clone() + pathAuths[a.ID] = a } if len(pathAuths) > 0 { w.fileAuthsByPath[normalizedPath] = pathAuths @@ -218,7 +218,7 @@ func (w *Watcher) addOrUpdateClient(path string) { if a == nil || strings.TrimSpace(a.ID) == "" { continue } - newByID[a.ID] = a.Clone() + newByID[a.ID] = a } if len(newByID) > 0 { w.fileAuthsByPath[normalized] = newByID