argoproj / argoproj/argo-workflows

Examine impact of string interning on memory usage

Open
#13,684 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
17k
Forks
3.7k
Avg merge
1d 20h
Merged PRs (30d)
138

Description

# Summary
Go 1.23 introduced string interning (https://pkg.go.dev/unique)

We use strings as enums all throughout the argo codebase, which in itself is quite alright, however they might take up a reasonable amount of memory given the amount of code/copying we have, in addition to this string copy (and the subsequent garbage collection needed) is not cheap (however in the context of argo workflows, the compute time for other work would easily eclipse the compute needed for string copying and garbage collection).

Therefore this issue is low priority, but this is a relatively cheap low hanging fruit that might reduce memory usage by 0.5-1%.

It might be a good first issue to explore around the codebase.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by surveying how string enums are used across the Go codebase and review Go 1.23's unique package. Measure representative memory and copying or garbage-collection effects, then document whether interning produces a meaningful improvement and where it would apply.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.