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

slow diff view on jupyter files, freezes UI for minutes #1316

Open
nevion opened this issue Jun 12, 2023 · 1 comment
Open

slow diff view on jupyter files, freezes UI for minutes #1316

nevion opened this issue Jun 12, 2023 · 1 comment

Comments

@nevion
Copy link

nevion commented Jun 12, 2023

So jupyter files get embedded images in them for things like graphs but otherwise are plain text files (json). When using git cola and changes like an image update occur, it can take about a minute or two for a jupyter document with many images to render the diff in the UI - I don't think the diffs themselves are reasonable examples to try and render because it's base64 encoding for images. Interestingly enough git-diff isn't the problem, with GIT_COLA_TRACE it is somewhere between 250-600ms for the actual git diff to complete - so the problem is in ui land.

If this can't inherently be made faster, maybe when the diff is above a certain megabyte threshold it should be treated like a large binary file's diff which is to say don't try to render it, and very importantly don't freeze the UI. I find half the time the diff view gets rendered is because I staged or unstaged something else adjacent to a jupyter file.

Any other ideas on how to deal with fairly large text json blobs / ipynb files?

@davvid
Copy link
Member

davvid commented Jun 21, 2023

Do you have an example repo I can clone to help reproduce the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants