Open sebthom opened 1 year ago
@sebthom are you looking into this? The current code calculates the annotations for the whole file on each selection change, which is overwork. I think I'll be able to look at this next week if you don't have a solution before then.
@jonahgraham I would appreciate if you can have look at it.
I have worked on a similiar issue in the Java editor (slow updates of the annotation model due to selections in large files), but did not find the time to finalize it yet and provide a PR for it. Probably the behavior and fix will be quite similar to this issue, so to avoid duplicate work I can also have a look at how the two issues and the underlying code is related and hopefully provide a combined/reusable fix.
Thanks @HeikoKlare - please feel free to tag me in that issue/PR and I will follow your lead. I hadn't quite gotten to start here.
@jonahgraham Sorry for taking so long to reply.
I have taken another look at the problem I addressed and tried to relate it to this issue. I was not able to figure out yet whether both can actually be reduced to the same root cause, but at least both are related to updates of the annotation model.
I have now created a GitHub issue describing the problem I have addressed in more detail: https://github.com/eclipse-jdt/eclipse.jdt.ui/issues/665 And I have committed the changes that I have tried out so far on a branch of my fork: https://github.com/HeikoKlare/eclipse.jdt.ui/commit/f27742ee28f232da3e88e6585467e6dc4e6295de
As far as I was able to validate, the changes so far resolve my issue. Maybe it can help you to solve this issue as well. I am not sure when I will find the time to have a deeper look at how far the issues are related and whether there is a chance for a combined fix.
Thanks @HeikoKlare.
When opening large files in the GenericEditor each mouse click or cursor move results in a freeze of several seconds making the editor unusable.
This is the stacktrace during the freeze
Here is a sample file AArch64GenAsmMatcher.cc.zip that I got from @jonahgraham