| Summary: | Sirius is using CPU cycles upfront | ||
|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Cedric Brun <cedric.brun> |
| Component: | Core | Assignee: | Laurent Redor <laurent.redor> |
| Status: | CLOSED FIXED | QA Contact: | Pierre-Charles David <pierre-charles.david> |
| Severity: | normal | ||
| Priority: | P3 | CC: | florian.barbin, laurent.redor, maxime.porhel, pierre-charles.david |
| Version: | 1.0.0M6 | Keywords: | triaged |
| Target Milestone: | 1.0.0M7 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Cedric Brun
A few additionnal thoughts after having a quick look at the code. It only makes sens if the workspace is up and any Sirius UI is loaded, right ? Why isn't this triggered in the plugin activator ? We should check if it is possible to move this initialization to the model explorer / model explorer content provider (can be contributed to other CNF view) initalization. This extension
<extension point="org.eclipse.ui.startup">
<startup class="org.eclipse.sirius.ui.tools.internal.views.common.modelingproject.manager.ModelingProjectManagerStartup">
</startup>
</extension>
is a first candidate. We must analyze whether we can keep the same behavior (or nearly) without this extension.
But there is also :
<extension
point="org.eclipse.ui.decorators">
<decorator
adaptable="false"
class="org.eclipse.sirius.ui.tools.internal.views.common.navigator.SessionLabelDecorator"
id="org.eclipse.sirius.ui.session.decorator"
label="Sirius Content Management"
lightweight="true"
location="TOP_RIGHT"
state="true">
<enablement>
<or>
<objectClass
name="org.eclipse.core.resources.IFile">
</objectClass>
<objectClass
name="org.eclipse.core.resources.IProject">
</objectClass>
</or>
</enablement>
</decorator>
</extension>
The enablement condition should probably be more restrictive (sirius nature for project, ...)
Waiting for 3 reviews for this problem: * https://git.eclipse.org/r/#/c/24790/ * https://git.eclipse.org/r/#/c/24838/ needed by https://git.eclipse.org/r/#/c/24839/ Warning: With these 2 fixes, Sirius plugins are always loaded if "Project Explorer" view is displayed. Indeed, Sirius provides content extension and filters to this view. It is possible to disable them but globally, even for "Model Explorer" view. This is not what is wanted. Fixed by commits [1], [2] and [3] [1] http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=6168f11d61f41a0821a103ca490d87c335d5f93c [2] http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=976694c726d6a3147fddede1a5a883f5412465c6 [3] http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=d777741471a5e4f9cb04e7e5356cb108a85feb12 To check whether or not a plug-in is started at some point, open the "Plug-in Registry" view and in the view's menu, enable "Show Active Plug-ins Only". Verified on 1.0.0M7rc1 (1.0.0.20405030833), using the procedure above to see which plug-ins are started. On Luna M6 with Sirius M6, right after startup on the Java perspective: 107 plug-ins started, 9 of them from Sirius. On Luna M7 with Sirius M7rc1, same conditions: 77 plug-ins started, none from Sirius. Note that going into the "Resources" perspective triggers Sirius initialization (and this starts most of our plug-ins) by default because we contribute filters and content providers through CNF extensions. If the user disables "Filters" and "Content" entries contributed by Sirius in the Project Explorer's Customize View dialog, then no Sirius plug-in is started anymore when going into the Resources perspective. See previous comment. Available in Sirius 1.0.0M7 (see https://wiki.eclipse.org/Sirius/1.0.0M7 & http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/tag/?id=v1.0.0M7). |