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

Memory consumption #473

Open
lc0 opened this issue Apr 27, 2019 · 5 comments
Open

Memory consumption #473

lc0 opened this issue Apr 27, 2019 · 5 comments

Comments

@lc0
Copy link

lc0 commented Apr 27, 2019

I run nbdiff for relatively not big file(~1.7mb) and memory goes up to ~3.5GB

What is kinda surprising, given that number of cells, that have differences is not huge.

I wonder if it make sense to do some local diffs for non-exact cells?
PS did not read much of code, so might sound not very smart 🙈

@lc0
Copy link
Author

lc0 commented Apr 27, 2019

Potentially this library looks quite fast to resolve diff

https://github.com/google/diff-match-patch

@vidartf
Copy link
Collaborator

vidartf commented Apr 28, 2019

That sounds like a lot. Is this a notebook you are able to share? It could be very useful for profiling. Depending on where the issue is, likely improvements are:

  • Finish the Myers algorithm for diffing instead of brute forcing it ( [WIP] Myers diffing algorithm #402 ).
  • Tweak comparison operators for certain output types.
  • Ensure no dangling refs prevent GC of old objects.

@vidartf
Copy link
Collaborator

vidartf commented Apr 28, 2019

Note: The actual library used for doing text diffs are unlikely to affect this issue, but that should of course be considered as well.

@vidartf
Copy link
Collaborator

vidartf commented Sep 28, 2020

Closing due to missing repro.

@vidartf vidartf closed this as completed Sep 28, 2020
@afeld
Copy link

afeld commented May 4, 2021

I have a file where use of nbdiff seems to grow without bound. To reproduce:

  1. Download https://github.com/afeld/python-public-policy/blob/129d5150e1796ecde2c947b4694c3430f388c8a1/lecture_3.ipynb
  2. Run nbdiff lecture_3.ipynb lecture_3.ipynb

@vidartf vidartf reopened this May 4, 2021
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

3 participants