Bug 497117 - [RSA] Performance implodes when importing dynamic profiles to static
Summary: [RSA] Performance implodes when importing dynamic profiles to static
Status: REOPENED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Others (show other bugs)
Version: 2.0.0   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Peter Cigehn CLA
URL:
Whiteboard:
Keywords:
Depends on: 497359
Blocks:
  Show dependency tree
 
Reported: 2016-06-30 14:40 EDT by Christian Damus CLA
Modified: 2017-08-02 13:44 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 Christian Damus CLA 2016-06-30 14:40:18 EDT
In very large RSA models, comprising dozens of fragments, that have profiles applied that are dynamically defined, the time taken in migrating stereotype applications to the corresponding Papyrus profiles increases by an order of magnitude when the Papyrus profile is statically defined as compared to when it is also dynamically defined.

For example, in a particular customer's confidential model, the time taken to import stereotype applications in the dynamic-to-dynamic was about 12 seconds.  Importing the same model in the dynamic-to-static case would take about 43 seconds, accounting for the entirety of the difference in the overall import performance.

The re-application of the profile has considerably more work to do in finding Ecore-to-UML correspondences in the profile definitions in the case of a statically defined profile, so probably some caching of these look-ups will help performance.
Comment 1 Christian Damus CLA 2016-07-05 09:02:07 EDT
It would appear that the fix for bug 497153 in UML2 solves this problem.
Comment 2 Peter Cigehn CLA 2016-07-05 09:32:32 EDT
I verified this with the latest UML2 fix installed, and the time for the dynamic-to-static case was reduced down from 43 to 22 seconds. I put this one into verified. If there are additional performance improvements that could be made, we can track those with other Bugzillas.
Comment 3 Peter Cigehn CLA 2016-07-05 10:18:40 EDT
I realized that apart from having the UML2 fix provided by Bug 497153 applied, I also had the draft Gerrit change https://git.eclipse.org/r/#/c/76564/ applied. I have actually not tested the UML2 fix "on its own", so any impact from that Gerrit change alone is not fully known.

Maybe we shall reopen this one, to make sure that this Gerrit change also is included, or shall we assume that we can abandon it? But then I guess that we (I?) should test the UML2 fix "on its own" before deciding that.
Comment 4 Christian Damus CLA 2016-07-06 01:42:47 EDT
(In reply to Peter Cigehn from comment #3)
> 
> Maybe we shall reopen this one, to make sure that this Gerrit change also is
> included, or shall we assume that we can abandon it? But then I guess that
> we (I?) should test the UML2 fix "on its own" before deciding that.

Indeed.  I've prototyped changes in the UMLUtil that reduce the time to re-apply a profile to a simple small model of 57 resources by more than a factor of ten:  bug 497359.

And it's not just re-applying profiles, but anything involving querying stereotype applications from statically generated profiles.
Comment 5 Christian Damus CLA 2016-07-06 01:52:02 EDT
(In reply to Christian W. Damus from comment #4)
> 
> Indeed.  I've prototyped changes in the UMLUtil that reduce the time to
> re-apply a profile to a simple small model of 57 resources by more than a
> factor of ten:  bug 497359.

Actually, it turned out not to matter in the UML2 context whether the model was fragmented, so my proposed patch for UML2 on that bug just implements tests on a single resource.  But the problem in RSA import is that stereotype repair is done on every resource separately, not just on the entire content tree from top down in one operation.  The proposed cache mechanism in UML2 could be used to put a caching scope around the entire multi-resource repair step in the RSA import, which should help much.
Comment 6 Eclipse Genie CLA 2016-07-12 00:04:14 EDT
New Gerrit change created: https://git.eclipse.org/r/77107
Comment 7 Christian Damus CLA 2017-04-13 08:46:07 EDT
RSA-RTE import is deprioritized for Papyrus-RT.