-
Notifications
You must be signed in to change notification settings - Fork 203
RunConfig is read from disk multiple times per workload during reconciliation #4456
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workinggoPull requests that update go codePull requests that update go codeperformance
Description
Problem
During a single reconciliation cycle (e.g., thv list or thv status), the fileStatusManager reads the same RunConfig file from disk multiple times per workload via runConfigStore.GetReader():
isRemoteWorkload()— readsremote_urlfieldisOwnedByActiveRuntime()— readsruntime_namefieldmigrateRuntimeName()— reads all fields (for write-back on legacy workloads)
Each call opens the file, parses JSON, extracts one or two fields, then closes. For a user with N workloads, thv list performs up to 3N file reads where N would suffice.
References
isRemoteWorkload:pkg/workloads/statuses/file_status.go(~line 169)isOwnedByActiveRuntime:pkg/workloads/statuses/file_status.go(~line 82)migrateRuntimeName:pkg/workloads/statuses/file_status.go(~line 114)- Related import cycle TODO:
pkg/workloads/statuses/file_status.go(~line 73)
Introduced by #4434.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggoPull requests that update go codePull requests that update go codeperformance