Bug 569876 - Unnecessary conversion to Array within DecoratorManager#getDecoratorsFor(Object element)
Summary: Unnecessary conversion to Array within DecoratorManager#getDecoratorsFor(Obje...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.15   Edit
Hardware: PC Windows 10
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-22 10:12 EST by Markus Wittig CLA
Modified: 2020-12-22 11:26 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Wittig CLA 2020-12-22 10:12:30 EST
The refresh of an "org.eclipse.jface.viewers.ViewerColumn" is done by an instance of the "DecoratingStyledCellLabelProvider" (for example the "Project Explorer View"). It uses the "org.eclipse.ui.internal.decorators.DecoratorManager" to retrieve the "FullDecoratorDefinition"s used for the text and images of the tree items. For that the Method "FullDecoratorDefinition[] getDecoratorsFor(Object element)" is used which creates a new array instead of just returning the Collection that is already retrieved by calling "getDecoratorsFor(Object element, DecoratorDefinition[] enabledDefinitions)". If there are many tree items it is a downer for the performance because it is done multiple times for each tree item and every time a new array is created with no benefit. It should return the already retrieved Collection and should not create a new array.
Comment 1 Lars Vogel CLA 2020-12-22 11:26:25 EST
Can you provide a Gerrit?