Skip to content

Performance issues when generating a diff for specific files #126

Open
@codebymikey

Description

@codebymikey

There are some noticeable performance issues when generating a diff for specific files. This Drupal yaml file in particular took about 70-80 seconds to generate a diff for.

There's some performance bottleneck somewhere in the algorithm since doing the same diff using other diffing tools like jsdiff and diffutil's diff command yields the result a lot faster.

I've created a repository for demo purposes: https://github.com/codebymikey/diff-performance-demo

Comparing the performance difference of the shell command and the library.

Sample output from running the script:

Method: shell
Duration: 0.0052549839019775
Output size: 8381
==============================
Method: php-jfcherng
Duration: 0.015406131744385
Output size: 8395
==============================
Method: php-sebastianbergmann
Duration: 27.506828069687
Output size: 8395
==============================

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions