Bug 414785 - [General] Improve performances of common operations for large-scale models
Summary: [General] Improve performances of common operations for large-scale models
Status: NEW
Alias: None
Product: Papyrus
Classification: Modeling
Component: Others (show other bugs)
Version: 0.10.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 415348
Blocks:
  Show dependency tree
 
Reported: 2013-08-09 10:48 EDT by Camille Letavernier CLA
Modified: 2017-09-08 09:49 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Camille Letavernier CLA 2013-08-09 10:48:55 EDT
This is a generic task for performance-related improvements.

Most performance issues on Big models (> 10k elements) are related to CrossReferencers (Stereotype application, object usages, ...) and too early calculations in commands (For example, when handlers test whether they should be enabled, they should avoid building the full command which would be executed. Otherwise, opening a context menu can take a lot of time)

- Usage to CrossReferencer should be limited to strict necessity
- Generic command-based handlers should be avoided (Because they build the command then call canExecute(), which can be really expensive)
- Facets and Customizations should avoid expensive queries to determine whether they are applied or not, because EMF Facet sends hundreds of refresh requests (ModelExplorer). Especially, queries such as "isDiagramContainer" should not browse the full resource set to retrieve all existing Diagrams.

For handlers, it is often possible to make a really simple test in the "isEnabled" method, and return true when in doubt (It is better to have a handler which is always enabled and sometimes does nothing, than a really accurate handler which will take tens of seconds to compute isEnabled() and will almost never be actually called)
Comment 1 Camille Letavernier CLA 2013-08-26 07:51:11 EDT
- Modified Hide and Delete handlers to improve performances (The "isEnabled" has been simplified to avoid freezing the popup menu on big models)
- Changed the implementation of PropertyHelperAdvice (In Composite and SysML IBD diagrams) to call the cross referencer as late as possible (Only when necessary). Previously, it was always called and most of the time not used.

c4fb8e980348c472d4f849187a1526d902c9ca89
5edafe2b18a98c06fbc9aad3a276e5512a4f0239
ed760c6f9e8e89da5e2fa57722ce8367ec4fb349

Small regression to be fixed: the Delete handler is enabled too often (Especially, it is enabled on root semantic elements, although it does nothing)

Commit 767fe2bde06aad86789a9a5419665b59854e3580 fixes some issues on the EMF Facet queries (But the commit is associated to Bug 363835)
Comment 2 Camille Letavernier CLA 2013-08-27 09:54:18 EDT
> Small regression to be fixed: the Delete handler is enabled too often (Especially, it is enabled on root semantic elements, although it does nothing)

Fixed in ce8aa9e818698b36aef8567c7a581b6e82d6cfbe
Pushed to master