-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
Skip inline diff wording when > 10 000 hunk #1134
Conversation
Bail out is okay, it still should run on the worker (even if this process only takes 1 second). |
For what it's worth, I get the same issue when committing an ipynb file and have verbose commits turned on... |
@kaste I agree. @asfaltboy is it show_full_commit_info we are talking about. I also have show_full_commit_info enabled. Maybe we should do something similar to what @kaste did on the status view. The async rendering. |
5a3a6f7
to
42a5b68
Compare
@kaste I did one attemt but It feels like it is flacking which is annoying. Do you have a hint to me? |
What exactly do you mean with 'flacking'? On first usage, it should open a new blank view, then do the work in the background, and paint once when it's ready. |
Sorry, flashing. I mean flashing. Take a look at the screen recoring. |
Hm, there is no cursor. You should do self.view.run_command("gs_replace_view_text", {
- "text": inline_diff_contents
+ "text": inline_diff_contents,
+ "restore_cursors": True
}) |
42a5b68
to
45862c6
Compare
And the patch I posted ☝️ doesn't work? |
no |
Hm, odd, I can reliable reproduce the selection issue you're showing, for the minimap if it is on. I get the whole selection only if the cursor is in block mode (since block mode is new, probably a bug). But the patch Please make sure to restart Sublime bc the reloader doesn't work reliable here. |
But keep in mind, it is not okay to always refresh async. Usually only on_activate and on_create. E.g. if we hunk something, we need to block the UI for that otherwise view and state get out of sync, and we probably cannot [hhh]unk anymore (just like what was the case for the diff view). |
There are other bugs as well, if you [h]unk just somewhere it will just throw at you. If you [h]unk just on the line before an actual hunk, it will still hunk. But if you [l]ine just before a changed line, it will actually stage the last line (iirc) from that hunk. |
My bad, did'r restart sublime but only refreshed modules. My bad. Now it work perfectly. I added 2 commits to your branch. Lets contiune the review over there. |
Continutes in #1138 |
fix: #1133
@kaste, This is't perfect but it helps. The
SequenceMatcher.get_opcodes
call is the slow one in this case When I run it on a file with 30000 charachets with one characher changes it takes 35 sec om my mac book pro. We could "solve" by backgrounding. I dont think is it worst the CPU time even.If you want to source controll a 30000 character long line manually please split it up. I also this SequenceMatcher uses more time it the are move changes between the lines.
An onther solution would be to use gits --word-diff. SequenceMatcher does a better job at finding the excat characher which changes. Git word-diff is a lot faster but less exact.
ok, fix?