Bug 581013 - Improve DestroyElementPapyrusCommand performances
Summary: Improve DestroyElementPapyrusCommand performances
Status: UNCONFIRMED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-08 11:25 EST by Sebastien Revol CLA
Modified: 2022-11-10 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 Sebastien Revol CLA 2022-11-08 11:25:09 EST
When removing an element from a Papyrus model, a call to org.eclipse.papyrus.commands.DestroyElementPapyrusCommand.fileOfIncomingReferences () is performed to get a list of the files containing model elements referencing the deleted element.

After a call to the cross referencers to get the list of referencing objects, the current implementation is  indirectly calling org.eclipse.emf.workspace.util.WorkspaceSynchronizer.getFile(Resource) for all the referencing objects, even if they all belong to the same resource.

This method is performing advanced and potentially costly Eclipse File System operations which can have a huge performance impact on big models.

I'll propose a patch that will first iterate on the referencing object to collect the set a of resources for which we should call WorkspaceSynchronizer.getFile(Resource).
Comment 1 Eclipse Genie CLA 2022-11-08 11:26:31 EST
New Gerrit change created: https://git.eclipse.org/r/c/papyrus/org.eclipse.papyrus/+/196657