Open u1735067 opened 4 months ago
Yeah, the new advanced diff algorithm has a horrible user experience for larger files. When diffing two 4,5k XML files with the Compare selected function, it immediately starts to lag after the initial load, and later it ceases to do anything without any feedback to the user. It would be better if it did not react to any and all keypress for larger files, but do its thing in batches for predefined intervals.
I just wanted to add that I have had the same issue with large files - it just keeps loading forever with no error/warning message. The issue is very misleading because the diff works well with some of the big files, but not with others - so initially I thought I had some kind of connection issue or some other problem, but after a lot of going back and forth, I found this post and I was able to fix it by changing the diff algorithm to "legacy".
When diffing docker build logs, I noticed the new default "advanced" diff algorithm is very slow and sometimes can completely fail to produce a diff (even after 30 secs, for 15k lines file). If there's no time limit, VS code will simply hang and never produce the diff. If there's a time limit and the diff takes longer, in the end you have the 2 files side by side but with no diff. And if you set the "legacy" diff algorithm, well you can't benefit from the "advanced" one for when it works.
So, if the "advanced" algorithm fails, is to possible to fallback to the "legacy" one instead of only showing 2 files side by side? Maybe optionally, and with still a fallback to 2 files side by side if the "legacy" fails too.
This was observed on: