Skip to content

Optimize persistence I/O - #2

Merged
Arbousier1 merged 1 commit into
codex/optimize-auto-savefrom
codex/optimize-persistence-io
Aug 1, 2026
Merged

Optimize persistence I/O#2
Arbousier1 merged 1 commit into
codex/optimize-auto-savefrom
codex/optimize-persistence-io

Conversation

@TypeThe0ry

@TypeThe0ry TypeThe0ry commented Aug 1, 2026

Copy link
Copy Markdown
Member

Summary

  • track dirty revisions independently for use times, favourites, random placeholders, and custom placeholders
  • write only changed SQL sections during automatic saves
  • persist each cache through one pooled connection and one transaction, with rollback on any section failure
  • write YAML through a same-directory temporary file and atomically replace the target when supported

Why

This is a focused follow-up to #1. The first round removes unconditional cache saves and smooths dispatch; this round reduces the remaining database connection/statement work and prevents a failed YAML overwrite from leaving a partially written data file.

Expected impact

  • fewer SQL connection borrows and statements per autosave
  • unchanged SQL sections no longer get rewritten
  • related SQL sections commit as one unit
  • interrupted YAML writes leave the previous data file intact

Validation

Stack

This PR is stacked on #1 and intentionally targets codex/optimize-auto-save so its diff contains only the second optimization round.

@Arbousier1
Arbousier1 marked this pull request as ready for review August 1, 2026 04:34
@Arbousier1
Arbousier1 merged commit 4b9efc4 into codex/optimize-auto-save Aug 1, 2026
1 check passed
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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