eclipse-jdt / eclipse-jdt/eclipse.jdt.ui

Poor Performance of Quick Outline View

Open
#1,922 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

performance
Dominant language
Java
Stars
59
Forks
127
Avg merge
1d 8h
Merged PRs (30d)
37

Description

(See [issue #2](https://github.com/vi-eclipse/Eclipse-JDT/issues/2) our internal backlog)

### Current Behavior

The quick outline view (Ctrl+O) opens very slowly when the opened class is part of a large class hierarchy. The root cause seems to be a combination of two things:
1. Loading the complete view is performed synchronously, thus the UI freezes while loading it.
2. The action calculates the complete inheritance hierarchy of involved classes in order to show the "method overwrite indicator" labels for methods that overwrite methods of superclasses. This information is not cached in the AST and is calculated everytime the quick outline view is opened.

The ordinary outline view calculates the overwrite indicator labels asynchronously by spawning a decoration job and thus provides the same information but without blocking the UI.

### Expected Behavior

The quick outline view shall open instantly and calculate and add additional information asynchronously. It should use the same behavior as in the ordinary outline view to improve responsiveness of the UI.
While loading the information in background, there should be an indicator that the view has not completely loaded all expected information in the quick outline view yet.

### Existing Workaround

Disable "Java Method Overwrite Indicator" label.

![8455de56-acf9-4dab-a1ad-1c94e1bfcced](https://github.com/vi-eclipse/Eclipse-JDT/assets/755472/cafa609b-719b-4dcc-abcd-029f596b89f2)

### Samples and reproducer
To reproduce, do the following:
- Import this Java project: [reproducer.zip](https://github.com/user-attachments/files/18372865/reproducer.zip)
- Make sure the "Java Method Overwrite Indicator" is active
- Go to the class `Broke1` and click `Ctrl` + `o` **twice**

This is the sample I got: [Broke1-I20241230-1800.zip](https://github.com/user-attachments/files/18372834/Broke1-I20241230-1800.zip)

I also sampled in our big WS (**~2.000** plugins and fragments), it takes **757s** to open the quick outline view:
[MyECU_2025-03-M1.zip](https://github.com/user-attachments/files/18372916/MyECU_2025-03-M1.zip)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the quick outline view opened by Ctrl+O and compare its loading behavior with the ordinary outline view, as described in the issue. Reproduce using the Broke1 project and the active Java Method Overwrite Indicator, then profile the opening delay. Done means the view opens responsively, background information loading does not freeze the UI, and incomplete loading is visibly indicated.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop, performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.