Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

bsdiff runs very long #2

Description

@ctc

I have 2 10MB big files where the bsdiff runs 82 minutes
bsdiff file_a file_b delta.diff

files.zip

Activity

  1. changed the title [-]compare runs very long and never ends?[/-] [+]bsdiff runs very long and never ends?[/+] on Mar 27, 2017
  2. changed the title [-]bsdiff runs very long and never ends?[/-] [+]bsdiff runs very long[/+] on Mar 27, 2017
  3. phmccarty commented on Mar 27, 2017

    @phmccarty
    Contributor

    Thanks for the report. I will investigate the problem.

  4. self-assigned this
    on Mar 27, 2017
  5. ctc commented on Mar 27, 2017

    @ctc
    Author

    Did some research and tests.

    It's a well known old problem.
    Switching to divsufsort does not help (from Freebsd)

    Slowdown happens in line 757 / search

    Sources:
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=409664;msg=14
    freebsd/freebsd-src@9c63dcd

  6. phmccarty commented on Mar 27, 2017

    @phmccarty
    Contributor

    @ctc search() is called after suffix sorting has finished, so I doubt that the suffix sort routines are to blame.

  7. tpepper commented on Mar 27, 2017

    @tpepper

    IIRC in the past we saw a 24 or 48hour diff'ing of a pair large kernel binaries. There's something that can go pathologically wrong on large binary inputs. Colin's paper talk about complexities with a log in them, but it feels like a bug somewhere turns things exponential sometimes.

  8. ctc commented on Mar 28, 2017

    @ctc
    Author

    @phmccarty no, I did some debugging with gdb - it loops in search and not in suffix sort, "scan" variable is slowly increasing.

    have switched now from rpm packages (files are rpm db's) to dpkg - now much better

  9. phmccarty commented on Jun 7, 2017

    @phmccarty
    Contributor

    I made some progress on this issue, with help from @tmarcu. See PR #3.

  10. added 2 commits that reference this issue on Dec 19, 2017
    fd89cc6
    b9537f1
  11. added a commit that references this issue on Feb 23, 2018
    85b1c53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions