Bug 562688 - CompilationUnitAnnotationModel collect annotations in inefficient way
Summary: CompilationUnitAnnotationModel collect annotations in inefficient way
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.15   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Jeff Johnston CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: performance
Depends on:
Blocks: 562286
  Show dependency tree
 
Reported: 2020-05-01 09:03 EDT by Dawid Pakula CLA
Modified: 2024-04-15 13:26 EDT (History)
2 users (show)

See Also:


Attachments
Simple test file (813.07 KB, application/octet-stream)
2020-05-02 10:05 EDT, Dawid Pakula CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dawid Pakula CLA 2020-05-01 09:03:57 EDT
For each "addAnnotation/removeAnnotation" cals, it iterate over all previous registered annotations.

In case when you have for ex. 40 000 annotation this slows-down entire workbench while replacing occurrences.

First performance boost can be gained by collecting only ProblemAnnotations and MarkerAnnotations so it simply ignore some of them. Example for DLTK: https://git.eclipse.org/r/161863
Comment 1 Dawid Pakula CLA 2020-05-02 10:05:26 EDT
Created attachment 282669 [details]
Simple test file

* Create uploaded file as src/simple_java/MyClass.java in any java project.
* Put cursor on "add" method. 

UI will be frozen on ReverseMap calls.
Off course this file is extremely stupid, but make problem easy visible.
Comment 2 Eclipse Genie CLA 2022-04-23 14:56:36 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.
Comment 3 Jeff Johnston CLA 2022-04-25 17:26:26 EDT
Hi Dawid,

I'm not able to reproduce this problem on 2022-03 and 4.24 M1.  Can you confirm whether the problem has been fixed by downloading either of the above SDKs from downloads.eclipse.org and rerunning your test?
Comment 4 Eclipse Genie CLA 2024-04-15 13:26:00 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.