Bug 576808 - Indexing of classes runs at glacial speeds 2021.9 macOS
Summary: Indexing of classes runs at glacial speeds 2021.9 macOS
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.21   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2021-10-21 09:05 EDT by Martijn Dashorst CLA
Modified: 2023-10-14 13:32 EDT (History)
3 users (show)

See Also:


Attachments
Screen recording of eclipse indexing (785.03 KB, video/quicktime)
2021-10-21 09:05 EDT, Martijn Dashorst CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martijn Dashorst CLA 2021-10-21 09:05:08 EDT
Created attachment 287371 [details]
Screen recording of eclipse indexing

When rebuilding a (fairly large) workspace, the indexing of classes runs at a glacial speed, even though not much outside of Eclipse is happening. Of course Eclipse is building the code, so that might be a factor.

I've attached a screen recording of the indexer running while Eclipse is building. As you can see, it is indexing at about 10 classes per second, which would and does take a considerable amount of time to complete.

Reproduction path:

- start a clean workspace (mvn clean outside of Eclipse helps wonderfully)
- enable build automatically
- use open type (cmd-T) to try to open any type
- watch paint dry, grass grow, Andromeda merge with Milkyway
Comment 1 Martijn Dashorst CLA 2021-10-21 09:08:21 EDT
Version: 2021-09 (4.21.0)
Build id: 20210910-1417

Eclipse is started with -Xmx and -Xms at 6GB/6GB, and uses the following JRE:

java.runtime.name=OpenJDK Runtime Environment
java.runtime.version=15.0.2+7-27
java.specification.name=Java Platform API Specification
java.specification.vendor=Oracle Corporation
java.specification.version=15
java.vendor=Oracle Corporation
java.vendor.url=https://java.oracle.com/
java.vendor.url.bug=https://bugreport.java.com/bugreport/
java.version=15.0.2
java.version.date=2021-01-19
java.vm.compressedOopsMode=Zero based
java.vm.info=mixed mode
java.vm.name=OpenJDK 64-Bit Server VM
java.vm.specification.name=Java Virtual Machine Specification
java.vm.specification.vendor=Oracle Corporation
java.vm.specification.version=15
java.vm.vendor=Oracle Corporation
java.vm.version=15.0.2+7-27
Comment 2 Andrey Loskutov CLA 2021-10-21 10:18:22 EDT
Is this a regression in 4.21, or was it always like this?
The data that is being indexed is on local drive or on NFS?
How big is the data that you index? Few bytes or few gigabytes?
Comment 3 Martijn Dashorst CLA 2021-10-21 14:04:36 EDT
This used to be quicker, or at least barely noticable. I update regularly so I don't know if this was already present in 2021.6, but I don't remember being flummoxed at this glacial speed while I was using 2021.6. 

I also don't hear coworkers complain about this taking so long, but they are often on earlier versions.

All data is on local SSD (macbook pro 2018).

I have no idea how much data is being indexed. The project itself is roughly 1.2M lines of Java code across 15000+ files, 67 maven modules, and uses quite a lot of libraries.
Comment 4 Gayan Perera CLA 2021-10-21 14:09:49 EDT
(In reply to Martijn Dashorst from comment #3)
> This used to be quicker, or at least barely noticable. I update regularly so
> I don't know if this was already present in 2021.6, but I don't remember
> being flummoxed at this glacial speed while I was using 2021.6. 
> 
> I also don't hear coworkers complain about this taking so long, but they are
> often on earlier versions.
> 
> All data is on local SSD (macbook pro 2018).
> 
> I have no idea how much data is being indexed. The project itself is roughly
> 1.2M lines of Java code across 15000+ files, 67 maven modules, and uses
> quite a lot of libraries.

@Martijn is there a possibility for you to get the visualvm sampling snapshot setting the sample frequency to 20ms ?
Comment 5 Martijn Dashorst CLA 2021-10-22 06:04:26 EDT
Will try when I see it happening again.
Comment 6 Andrey Loskutov CLA 2021-10-23 10:04:36 EDT
(In reply to Martijn Dashorst from comment #5)
> Will try when I see it happening again.

No need to wait, you can trigger index rebuild immediately from preferences -> Java. Trigger that, say Apply and watch if that slow index rebuild happens again. In that case, please create visualvm snapshot or few jstack dumps, or check with yourkit what takes so much time.
Comment 7 Eclipse Genie CLA 2023-10-14 13:32:24 EDT
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.