Skip to content

Conversation

@xenoscopic
Copy link
Contributor

Slicing the first element of a slice doesn't shrink the capacity of the underlying slice, so continual appends will cause the memory to grow unbounded. The proper solution here would be a better data structure, but since we want this JSON-encodable, we can do a memory shuffle for now.

We can also avoid map lookups on every access.

@xenoscopic xenoscopic requested a review from ilopezluna July 18, 2025 09:29
Slicing the first element of a slice doesn't shrink the capacity of the
underlying slice, so continual appends will cause the memory to grow
unbounded. The proper solution here would be a better data structure,
but since we want this JSON-encodable, we can do a memory shuffle for
now.

Signed-off-by: Jacob Howard <[email protected]>
@xenoscopic xenoscopic force-pushed the recorder-memory-leak branch from b43cd64 to 2fd8517 Compare July 18, 2025 09:30
@xenoscopic xenoscopic merged commit 843a94c into main Jul 18, 2025
4 checks passed
@xenoscopic xenoscopic deleted the recorder-memory-leak branch July 18, 2025 15:18
doringeman pushed a commit to doringeman/model-runner that referenced this pull request Oct 2, 2025
…el-pull-docs

docs: note about quantized models
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.

4 participants