Skip to content

Optimize Analysis Memory#16

Merged
kalverra merged 8 commits into
mainfrom
fixMemory
Jun 16, 2026
Merged

Optimize Analysis Memory#16
kalverra merged 8 commits into
mainfrom
fixMemory

Conversation

@kalverra

@kalverra kalverra commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Analyze on large test results would hit OOM errors. This breaks up the function, and uses https://github.com/buger/jsonparser for speed + memory efficiency.

@kalverra kalverra requested a review from a team as a code owner June 16, 2026 15:10
@github-actions

Copy link
Copy Markdown

👋 kalverra, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@kalverra kalverra enabled auto-merge (squash) June 16, 2026 15:45
Comment on lines +56 to +65
if len(b) == 0 {
return ""
}
s, ok := i.m[string(b)]
if ok {
return s
}
s = string(b)
i.m[s] = s
return s

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't require a mutex?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. There's now 1 stringInterner per Analyze call, so multiple' Analyze' calls won't access it in parallel. And the Analyze loops over it sequentially, so no mutex is needed.

@kalverra kalverra merged commit 522a65b into main Jun 16, 2026
9 checks passed
@kalverra kalverra deleted the fixMemory branch June 16, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants