#10295

rebasing with a large number of conflicts is extremely slow

Openyshuiopened 1mo ago

Description

While doing a large cleaning up work, I first modified a commit long into the past, ~300 commits deep. This created a large number of conflicts in the 300 descendant commits. I then go commit by commit and trying to fix those conflicts. And I do this standard way: jj new <conflicting commit>, make changes, then jj squash.

What I noticed is jj squash is starting to take longer and longer as I go. First it will complete in ~5 minutes, then 15 minutes, then 20 minutes. Right now it's been running for 35 minutes and still going.

The on disk size of .git is also exploding. it went from 2G before I started, to 21G right now.

Specifications

  • Platform: NixOS
  • Version: 0.45.1

Activity

5
scott20001mo ago

Maybe #4152 would help with this?

yshui1mo ago

@scott2000 i think it can. i think i am seeing the same problem. i tried looking at the number of trees the tip commit has as suggested in https://github.com/jj-vcs/jj/issues/4152#issuecomment-4215597585, and the number is indeed enormous...

is there something i can test? is there a way to salvage a repository in this state?

martinvonz1mo ago

is there a way to salvage a repository in this state?

Is it an option for you to resolve the conflict?

martinvonz1mo ago

You can possibly resolve conflicts closer to the tip to reduce the amount of rewriting of conflicts.

yshui1mo ago

resolving conflicts from tip means i'd need to repeat the same resolution many times?

also, nevermind, the repo broke:

Internal error: Unexpected error from backend
Caused by:
1: Object 44514dbb2906d71c05a26eb64ce950ed7f94b4c3 of type commit not found
2: An object with id 44514dbb2906d71c05a26eb64ce950ed7f94b4c3 could not be found

i think maybe it's because i ran a concurrent gc while jj squash is doing its thing (thought it would help). idk for sure.