Bug 452662

Summary: FilterListener is called twice
Product: [Modeling] Sirius Reporter: Esteban DUGUEPEROUX <esteban.dugueperoux>
Component: DiagramAssignee: Project Inbox <sirius.diagram-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: florian.barbin, laurent.redor, pierre-charles.david
Version: 2.0.0Keywords: performance, triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Esteban DUGUEPEROUX CLA 2014-11-21 09:28:52 EST
With scenario of Bug 452558 FilterListener is called twice, even in manual refresh.
We could avoid that by having FilterListener execute its TriggerCommand only in manual refresh and in auto-refresh have it executed directly by the diagram refresh. We see in RefreshDiagramOnOpeningCommand that the same work of FilterListener is done, i.e. call of : 

CompositeFilterApplicationBuilder builder = new  CompositeFilterApplicationBuilder(diag);
builder.computeCompositeFilterApplications();
Comment 1 Esteban DUGUEPEROUX CLA 2014-11-21 09:58:47 EST
The issue is that CompositeFilterApplicationBuilder is in diagram.ui plugin and has dependencies to NodeQuery which is dependant to draw2d.
A refactoring of this query is needed to be ui independant.
Comment 2 Pierre-Charles David CLA 2014-12-04 10:36:08 EST
Is this issue about performance, or does it cause an actual bug to invoke the FilterListener? If this is a performance issue, please tag it as such and provide measurable data, see https://wiki.eclipse.org/Sirius/Bugzilla.

Without some actual explanation of why this is a problem and how bad it is, we have no way to prioritize the issue.
Comment 3 Esteban DUGUEPEROUX CLA 2014-12-05 04:28:19 EST
This is about performance, using Test2.zip attachement of Bug 452558 with initial scenario we have these times :

FilteredElementsUpdateCommand execution : 4ms
DDiagramSynchronizer.refresh execution : 153ms
FilteredElementsUpdateCommand execution : 4ms

The cost of FilteredElementsUpdateCommand execution is minor but it should be executed only once at the end of diagram refresh execution.