Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diffs of large files made of mostly a single line can take very long #45

Open
swisspol opened this issue Mar 2, 2016 · 6 comments
Open
Labels

Comments

@swisspol
Copy link
Contributor

swisspol commented Mar 2, 2016

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.

@swisspol swisspol added the bug label Mar 2, 2016
@swisspol swisspol changed the title Very long load time on diffs of large single line files Diffs of large files made of mostly a single line can take very long Mar 2, 2016
@swisspol
Copy link
Contributor Author

swisspol commented Mar 2, 2016

The diffing should be abort if taking too long anyway.

@mdtusz
Copy link

mdtusz commented May 31, 2016

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.

@dmitriid
Copy link

dmitriid commented Sep 19, 2017

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.

@NikKovIos
Copy link
Contributor

+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.

@phatmann
Copy link

phatmann commented Oct 12, 2018

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?

@bonyadmitr
Copy link

bonyadmitr commented Jul 18, 2023

@lucasderraugh Hello

i reproduced the problem and took screenshots of the code freezes.

Screenshot 2023-07-18 at 17 54 19
Screenshot 2023-07-18 at 17 40 22

example for about 2 min freeze. it is for diff of a lot of cocoapods changes in the project
Screenshot 2023-07-18 at 17 58 31

As I can see, the problem in the libgit2 find function.
But i don't know how to fix the problem, the code not so easy for me.
Seems like it needs a complex solution to fix it.

I think we need similar solution from app SourceTree like "diff was suppressed of file size or pattern" and maybe settings for that.

p.s. Thank you so much for the GitUp!

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

No branches or pull requests

6 participants