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

Performance issues when generating a diff for specific files #126

Open
codebymikey opened this issue Oct 23, 2024 · 0 comments
Open

Performance issues when generating a diff for specific files #126

codebymikey opened this issue Oct 23, 2024 · 0 comments

Comments

@codebymikey
Copy link

codebymikey commented Oct 23, 2024

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
==============================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant