Bug 442464 - Do not refresh representations which are opened but not visible
Summary: Do not refresh representations which are opened but not visible
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 1.0.1   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance, triaged
Depends on:
Blocks:
 
Reported: 2014-08-25 05:41 EDT by Yann Mortier CLA
Modified: 2014-09-03 10:15 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yann Mortier CLA 2014-08-25 05:41:16 EDT
For the moment the auto-refresh feature refreshes all opened representations when a semantic change occurs. It causes performance problems when many representations are opened.

A basic solution could be to refresh only opened and visible editors (IWorkbenchPage.isPartVisible(IWorkbenchPart)). This solution implies to:
 - refresh a representation when an editor becomes visible and the auto-refresh is enabled
 - not refresh a representation on opening and the auto refresh is enabled (the representation should be refreshed when the editor becomes visible).
Comment 1 Maxime Porhel CLA 2014-09-02 05:12:34 EDT
Note that refreshing a representation on setFocus/setVisible might cause performance issues too. The current behavor can take time to refresh all opened editors, but then the switch to other editors is nearly free. With the proposed behavior, the user might not understand why making an editor visible takes time and make the session dirty.
Comment 2 Laurent Redor CLA 2014-09-03 10:10:02 EDT
With the proposed solution, a new status is needed to know if an editor is already refreshed. Indeed, if a refresh is launched between each editor change (without changes in the model), this will be problematic for performance.
Comment 3 Laurent Redor CLA 2014-09-03 10:13:12 EDT
For information: We have already notice some problems around setFocus notification that is not handled by the same way in different OS (linux, windows, mac). I do not remember in which context but it will have that in mind.
Comment 4 Laurent Redor CLA 2014-09-03 10:15:50 EDT
The method IWorkbenchPage.isPartVisible(IWorkbenchPart) uses LayoutPart.getVisible(): Returns true if this part was set visible. This returns whatever was last passed into setVisible, but does not necessarily indicate that the part can be seen (ie: one of its ancestors may be invisible)...