Bug 569124

Summary: lines' locations are changing when code mining is enabled
Product: [Eclipse Project] JDT Reporter: hossein mahdavipour <hosseinmp76>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: REOPENED --- QA Contact:
Severity: normal    
Priority: P3 CC: hosseinmp76, mistria, rgrunber
Version: 4.18   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug
Bug Depends on: 569550    
Bug Blocks:    
Attachments:
Description Flags
screenshot none

Description hossein mahdavipour CLA 2020-11-24 09:09:45 EST
Created attachment 284871 [details]
screenshot

As code mining is enabled when you open a java file it starts to find the usages and implementations etc. So when you open each file you have to wait up to 2 seconds to be able to edit the file because lines' locations are changing and you can't even click where you wish.
I think it's better to index the whole project when we open it and then persis the index of code mining so when we open a file there is no need to mine the code.
Especially it annoys when you close and reopen a file and you have to wait again.
This could make the project opening process longer but waiting every time I open a file is unacceptable.
Comment 1 Roland Grunberg CLA 2020-12-09 10:32:02 EST
I completely agree, and this is slowly becoming quite annoying. Particularly when one opens a file and just wants to click on a particular type/field and get some quick info, and it keeps changing location in the view as the annotations load.

I'm going to mark this as a duplicate of Bug 568844 as they're very similar. Mickael has already commented there, and it makes sense to make him aware of this issue as well.

*** This bug has been marked as a duplicate of bug 568844 ***
Comment 2 Mickael Istria CLA 2020-12-09 10:44:53 EST
Actually, I'm going to reopen. While the story of vertical vs horizontal jump is similar; it's also quite different under the hood and both will require different work items and may be resolved separately.
In practice, I think this one may be a symptom of bug 569550 .

However, one workaround remains that user just don't enable those reference code minings if they don't like them. Window > Preference > Java > Editor > Code Minings has all the necessary configuration to allow that.
Comment 3 Mickael Istria CLA 2020-12-09 10:47:32 EST
(In reply to hossein mahdavipour from comment #0)
> This could make the project opening process longer but waiting every time I
> open a file is unacceptable.

That I totally disagree with. Code Minings are not blocking nor much slowing down the user, while doing more load before opening would basically increase the time *every* users have to wait before they get their editor open, not being much able to do anything useful in the meantime. That would be even more unacceptable.
Comment 4 hossein mahdavipour CLA 2020-12-09 11:59:12 EST
(In reply to Mickael Istria from comment #3)
> That I totally disagree with. Code Minings are not blocking nor much slowing
> down the user, while doing more load before opening would basically increase
> the time *every* users have to wait before they get their editor open, not
> being much able to do anything useful in the meantime. That would be even
> more unacceptable.

In my experience, I have to wait more in this way. If in one coding session I open 40 files(that's not much. think of a small typical backend project with 10 entities each one has rest, service, and db classes and interfaces) I have to wait for 2 * 50 seconds.

Maybe it would be good to make an option for the user so he can select if he wants a start-up pre-process. I mean in small java projects maybe it's not a good approach(depending on how much time it takes) but maybe in big projects that it takes more time for each file to be processed + you have to open many files, it would be a good approach.(to be honest the idea of not pre-processing is the biggest draw-back of the Eclipse when comparing to IntelliJ idea. another example is the search. search in project level in IntelliJ idea is instant but Eclipse doesn't index project at startup and you have to wait for every search)
Comment 5 Eclipse Genie CLA 2023-02-03 17:23:04 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.