Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 485259

Summary: [Performances - Properties View] Opening a Reference browser is slow on big models
Product: [Modeling] Papyrus Reporter: Camille Letavernier <cletavernier>
Component: ViewsAssignee: Camille Letavernier <cletavernier>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: rschnekenburger
Version: 1.1.0   
Target Milestone: SR2   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/63620
https://git.eclipse.org/r/63623
https://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/commit/?id=fc06e2bba73aa5f351575fc33e5d1d9c30fda6ba
https://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/commit/?id=53bd3941853109af4fc17d1320c60a3e3bfb12a0
Whiteboard:
Bug Depends on: 485329, 485539    
Bug Blocks:    

Description Camille Letavernier CLA 2016-01-06 05:26:53 EST
When opening a Reference Dialog, it can take several seconds (Bigger models are slower)

The main issue comes from the EditServiceValidator that will check each value from this dialog, to determine whether it can be applied to the edited property (And filter it out if that's not the case).

This validator creates a lot of commands in the process
Comment 1 Camille Letavernier CLA 2016-01-06 05:28:00 EST
Since we always use the same Element Type / Request type (With different values), it should be possible to add a caching mechanism to the validator to avoid recomputing the advices for each value. 

A similar solution has been implemented for the New Child menu
Comment 2 Camille Letavernier CLA 2016-01-06 05:30:27 EST
> A similar solution has been implemented for the New Child menu

See Bug 463564 and especially commit cf974dd3
Comment 3 Eclipse Genie CLA 2016-01-06 05:55:35 EST
New Gerrit change created: https://git.eclipse.org/r/63620
Comment 4 Camille Letavernier CLA 2016-01-06 05:57:06 EST
> New Gerrit change created: https://git.eclipse.org/r/63620

I will change this contribution slightly for Mars SR2, to limit the risk of side-effects (Especially, I won't modify the current RequestCacheEntries on Mars; I will move the code to the EditServiceValidator to have a more localized impact)
Comment 5 Eclipse Genie CLA 2016-01-06 07:01:38 EST
New Gerrit change created: https://git.eclipse.org/r/63623
Comment 6 Camille Letavernier CLA 2016-01-06 07:02:49 EST
> New Gerrit change created: https://git.eclipse.org/r/63623

Same as before but for Mars, slightly adjusted as mentioned in Comment 4 (I didn't change the current implementation in the Edit Service; only in the EditServiceValidator used by the UML ContentProvider)
Comment 7 Camille Letavernier CLA 2016-01-06 07:14:19 EST
The fix greatly improves performances: opening the dialog now takes ~200ms instead of ~4s in a medium-sized model

Opening the dialog for the first time may still be a little bit slower because some referenced libraries may be loaded (But this will happen only once in the editor)

The Gerrit builds are currently failing for unrelated reasons (Issues in the build configuration). I've restarted them
Comment 9 Eclipse Genie CLA 2016-01-06 08:25:12 EST
Gerrit change https://git.eclipse.org/r/63623 was merged to [streams/1.1-maintenance].
Commit: http://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/commit/?id=53bd3941853109af4fc17d1320c60a3e3bfb12a0
Comment 10 Camille Letavernier CLA 2016-01-06 08:29:12 EST
Fixed on Mars & Master