Gitup: Diffs of large files made of mostly a single line can take very long

Created on 2 Mar 2016  路  5Comments  路  Source: git-up/GitUp

The problem is not the file size, but when diff'ing text files which are made of a huge single line, so GitUp spends a lot of time computing the wrapping. And in Side-by-Side mode vs Unified mode, it needs to do it twice by definition, so it would be twice as slow.

In the meantime, I would recommend trying to mark such minified files as binary through the use of Git attributes. This way they won't even be diff'ed.

bug

Most helpful comment

+1 for fixing this. Have to work with a big files and every time the app freeze when looking a detailed commit.

It would be better a:
1) Available in settings what size of file (count of line changes or so on) can be at max to show a code.
2) When it is over that limit show the text file is too large, click if you really want to see it and a button to expand code.

All 5 comments

The diffing should be abort if taking too long anyway.

Might be good to just not display diffs that are > n changes unless the user requests it? I frequently will have to force quit if/when I come across a huge diff.

So, what's the resolution on this? GitUp still chokes on even moderately large files (or large sets of files, or sets of mixed files). It would be nice if diffing aborted and/or showed something like github's "file is too large, click if you really want to see it"

This is true even for advanced mode, even though there have been reports that advanced mode is faster than simple mode.

+1 for fixing this. Have to work with a big files and every time the app freeze when looking a detailed commit.

It would be better a:
1) Available in settings what size of file (count of line changes or so on) can be at max to show a code.
2) When it is over that limit show the text file is too large, click if you really want to see it and a button to expand code.

If one of my commits involves an Xcode project file, Gitup can hang up to 5 minutes while it produces the diff. The fix is simple: do not show diffs on large files. For the record the diff view in Xcode works very well on large project files, so it can be done if we want it. I just don't think it is needed.

Any reason no one has submitted a PR for this?

Was this page helpful?
0 / 5 - 0 ratings