Bug 493241 - Computation of newly created elements to select should not be done in the UI thread.
Summary: Computation of newly created elements to select should not be done in the UI ...
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 3.1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on: 482606
Blocks:
  Show dependency tree
 
Reported: 2016-05-09 09:02 EDT by Maxime Porhel CLA
Modified: 2017-08-31 09:59 EDT (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 Maxime Porhel CLA 2016-05-09 09:02:35 EDT
Bug 482606 corrected some performance regression: the UI thread was blocked by the computation of new created elements to select. 

The regression has been corrected on master for 4.0 and on v3.1.x branch but it can be improved: the event should be initialized in the UI Thread. 

The patchset available in https://git.eclipse.org/r/#/c/60842/ moves the computation in the async runnable. It was the first idea to avoid to analyze the event in the UI thread. 

But it should probably be the other way around: with a single listener for all editors. 
This listener might be managed by the EditingSession for example. We need to add a way to allow each dialect editor to allow it to tell "until further notice, I'm the active one" (this might be done in the setFocus(), or with some listener), we might notify the editing session, or the resourceSet might itself listen to editor activation/ selection.
Both solutions would avoid the ResourceSetChangeListener to have to access the UI thread to make the test.
Comment 1 Pierre-Charles David CLA 2017-04-13 03:47:19 EDT
This should not require API changes, and thus can wait for 5.1.