perf: optimize RunState memory with slots and faster list operations#2867
perf: optimize RunState memory with slots and faster list operations#2867KirobotDev wants to merge 10 commits intoopenai:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70d40a2b54
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Thanks. I understand the intent, but this looks like a micro-optimization. I would need to see quantitative evidence of meaningful end-to-end impact, for example lower RSS or faster resume times on a realistic run/resume workload, before taking on the compatibility/readability tradeoff. |
|
Even a small optimization and significant in certain cases but yes I see what you mean :) |
|
Fair point on the slots. Reverted - only 7% gain with our field structure. Kept the actual bugfix (shallow copy in max_turns handler) and dropped the micro-optimizations. PR is now focused just on fixing the shared mutable state issue @seratch |
Sorry for my many pull requests I am working hard to help and contribute to the project :)
Changes: