Skip to content

[PERF] /undo /redo really slow on larger repos and/or long histories #11486

Closed

Description

@zekronium

Description

For large repositories or for repositories with long git histories, where .git is large, /undo and /redo performance is really slow

Not entirely sure how the progress is stored in the .git index and why would it exponentially slow down with the size of the .git history, especially when changes are NOT committed during the session

The file changes are also not large and do not seem to relate with any in session work. A fresh session with a simple message "hi" will take 10-15s to undo. Redo seems to take 2-3x longer than what undo took

Plugins

None

OpenCode version

1.1.48

Steps to reproduce

  1. Open Large Repo / Long Git History
  2. undo a message - slow
  3. redo a message - slower

Screenshot and/or share link

No response

Operating System

macos 15.7.3

Terminal

Ghossty

Activity

  1. added
    perfIndicates a performance issue or need for optimization
    on Jan 31, 2026
  2. github-actions commented on Jan 31, 2026

    @github-actions
    Contributor

    Thanks for the detailed report! I've searched through existing issues and found a potentially related issue that could contribute to this problem:

    Additionally, there may be an underlying issue with how snapshots/git operations are handled on large repositories that could contribute to the exponential slowdown you're experiencing.

    This appears to be primarily a performance issue specific to the /undo /redo commands on large repos, rather than a duplicate of existing reports. Your detailed steps to reproduce and the specific timing (10-15s for undo, 2-3x slower for redo) will be helpful in diagnosing this.

  3. github-actions commented on Apr 2, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingperfIndicates a performance issue or need for optimization

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions