Skip to content

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

Open

Description

@swisspol

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.

Activity

  1. 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[/+] on Mar 2, 2016
  2. swisspol commented on Mar 2, 2016

    @swisspol
    ContributorAuthor

    The diffing should be abort if taking too long anyway.

  3. mdtusz commented on May 31, 2016

    @mdtusz

    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.

  4. dmitriid commented on Sep 19, 2017

    @dmitriid

    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.

  5. NikKovIos commented on Jan 22, 2018

    @NikKovIos
    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.
  6. phatmann commented on Oct 12, 2018

    @phatmann

    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?

  7. bonyadmitr commented on Jul 18, 2023

    @bonyadmitr

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions