Sublime Forum

Deadly slow merge resolve

#1

After attempting a merge when I press the resolve button the next screen shows the spinning status for 2-4 minutes.

  • The project has 20,000+ files but the file with the conflict is never more than a few thousand lines.
  • The cancel button also freezes the UI for about 4-5 seconds (every time).
  • After showing the resolve screen once subsequent resolving doesn’t have the same delay.

Not sure if this is Sublime Merge or git. There’s no status that I’m aware of so if this was git it would be nice to know what git was doing.

Is this a known issue? If not is there anyway I could help you reproduce the problem?

1 Like

#2

Do you have a large number of modified, untracked, or staged files in your working dir?

0 Likes

#3

I experience the exact same problem (only I do not have patience to wait for it to finish loading, not sure it ever does). I don’t think I experienced this a few months ago, so maybe it came with an update. I’m on Windows 10 v1809, and Sublime merge build 1116. The merge i’m in right now has 6000 staged files, and just a few unmerged and unstaged.

One interesting note is that it works just fine with when configuring smerge as a git mergetool as described here. no delay when running git mergetool.

0 Likes

#4

Sorry I forgot about this! Yeah my project is a compiler with a few thousand files (https://github.com/genericptr/freepascal) but that shouldn’t matter I think.

Have any of the ST devs tried this thing on big projects? Something seriously wrong and needs to be fixed. Can’t even use it to resolve conflicts until then.

0 Likes

#5

This is still happening on OS X (10.14.6), Sublime Merge build 2032. Makes resolving in SM intolerable, and doesn’t seem related to number of untracked files or their size.

After clicking ‘save & stage’, the client will go to 100% CPU for ~30 seconds plus.

Anecdotally, while that’s the case, com.apple.hiservices-xpcservice shows as unresponsive. Once that finishes choking, everything goes back to normal. This happens for every file needing resolving in a merge.

Edit:
After resolving the largest & highest conflict files in the merge, this time seemed to go down proportionally. But even resolving single-line conflicts in files with ~20 lines was incurring this cost until those bigger files were out of the way.

0 Likes

#6

@lollerbus, given that edit, does collapsing all files prior to resolving conflicts help? (i.e. before resolving the largest/highest conflict files).

Also:

  • how many files were changed?
  • roughly, how many hunks are there total?
  • roughly, how many are there in those latest/highest conflict files?
0 Likes

#7

@srbs This behavior is with all of the diffs collapsed.

Will try to repro with the same merge again tomorrow and get some real numbers.

Off the top of my head, the two problem files were:
6.2 MB JSON – 150k lines with at least 100s of hunks
1.1MB JSON – 29k lines with probably dozens of hunks

Total files needing resolve: ~50, with perhaps several hundred in the commit.

0 Likes

#8

@srbs This is still kicking around on Sublime Merge 2039.

Output from git diff-tree -r --numstat <branch1> <branch1> (filenames yanked)

8   36  
1   1   
1   1   
5   5   
2   2   
4   4   
4   4   
5   5   
5   5   
2   2   
25  0   
1   1   
1   1   
1   1   
1   1   
1   1   
2   2   
2   2   
1   1   
2   2   
2   2   
2   2   
2   2   
1   1   
1   1   
2   2   
2   2   
2   2   
2   2   
1   1   
1   1   
1   1   
2   2   
1   1   
1   1   
2   2   
1   1   
1   1   
3   3   
1   1   
2   2   
1   1   
1   1   
1   1   
1   1   
1   1   
2   2   
1   1   
2   2   
1   1   
1   1   
3   3   
1   1   
1   1   
1   1   
2   2   
1   1   
2   2   
2   2   
2   2   
3   3   
1   1   
1   1   
2   2   
1   1   
1   1   
2   2   
1   1   
1   1   
1   1   
1   1   
1   1   
1   1   
2   2   
1   1   
2   2   
2   2   
1   1   
1   1   
1   1   
1   1   
1   1   
1   1   
1   1   
2   2   
1   1   
2   2   
1   1   
1   1   
1   1   
2   2   
1   1   
1   1   
2   2   
3   3   
1   1   
1   1   
2   2   
1   1   
1   1   
1   1   
1   1   
1   1   
1   1   
1   1   
1   1   
1   1   
2   2   
2   2   
5   1   
1   1   
1   1   
1   1   
1   1   
1   1   
27  0   
2   2   
3   3   
2   2   
2   2   
2   2   
1   1   
2   2   
2   2   
2   2   
2   2   
2   2   
27  0   
2   2   
1   1   
27  0   
1   1   
2   2   
2   2   
2   2   
2   2   
2   2   
2   2   
2   2   
2   2   
2   2   
2   2   
2   2   
2   2   
2   2   
2   2   
2   2   
2   2   
2   2   
2   2   
2   2   
2   2   
2   2   
2   2   
2   2   
2   2   
2   2   
2   2   
4   0   
14  138 
44  580 
14  14  
121496  
122604  
18  18  
642 0   
88  0   
2   2   
40  69  
7   0   
18  35  
0   10  
1   5   
3   2   
9   39  
1   1   
245 0   
1   1   
192 0   
253 279 
26  10  
44  28  
67  51  
76  60  
54  38  
66  50  
39  23  
31  15  
28  20  
49  33  
26  10  
35  19  
30  14  
35  19  
42  26  
37  21  
84  68  
44  28  
30  14  
27  11  
34  18  
48  31  
27  11  
32  16  
29  13  
41  25  
0   29  
0   4   
1   0   
5   0   
1   1   
1   5   
1   1   
1   1   
3   3   
4   4   
5   5   
6   1   
1   2   
1   3   
1   3   
1   3   
1   3   
1   3   
1   1   
2   5   
3   3   
392 291 
4   4   
5   9   
6   19  
1   1   
109 0   
39  5   
30  4   
1   12  
51  127 
1   14  
97  230 
368 0   
1325    
137 0   
473 0   
1444    
28  11  
1   1   
0   89  
0   517 
0   79  
0   509 
0   150 
0   42  
0   35  
0   48  
0   319 
1   1   
0   12  
1   13  
2   12  
5   5   
0   4   ```
0 Likes