Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Forms] Render asynchronously
[EMF Forms] Render asynchronously [message #1751116] Wed, 04 January 2017 15:03 Go to next message
Hauke Fuhrmann is currently offline Hauke FuhrmannFriend
Messages: 25
Registered: January 2016
Junior Member
Hi there,

I have some domain model which I render with EMF Forms which has about 90 controls (all with default renderers, primitive types and some references).
The initial rendering takes on an up-to-date desktop-PC about 2s and on a less performant machine about 10s, no matter how much memory they have (8-16GB). Removing our own validators does not help.

A profiler simply tells me that the time is spent in the method org.eclipse.emf.ecp.ui.view.swt.ECPSWTViewRenderer.render(Composite, EObject, VViewModelProperties).
[Edit:] Digging deeper with JProfiler shows that most of the time (>50%) is spent in GridLayout.layout and Composite.setResizeChildren; both triggered by AbstractSWTRenderer.applyVisible. Only about 15% of the time is spent in SimpleControlSWTRenderer.renderControl.

Are such rendering times typical?
Is there any approach possible where to render the composite asynchronously such that the rest of the application stays responsive in the mean-time?


[Updated on: Wed, 04 January 2017 16:26]

Report message to a moderator

Re: [EMF Forms] Render asynchronously [message #1751127 is a reply to message #1751116] Wed, 04 January 2017 16:32 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 76
Registered: September 2016
Hi Hauke,

first of all: 10 seconds are definitely not normal, even for a very complex UI. Are you sure nothing else is happening in the background, e.g. lazy loading the model or any custom validations? It would help, if you could reproduce this with a open model and a minimal example (e.g. make it happen model).

However, for complex UIs, creating the SWT elements will take some time.

It is definitely possible to render the UI asynchronously. We typically use a stack layout to show first that the UI is loading and then we display the actual UI, once it has been loaded. The TreeMasterDetailComposite of EMF Forms already does that by default.

If you always show the same element type, you might consider to replace the input instead of re-rendering the UI, that will save a lot of time.

Finally, if you open the same UI with different types, but they are repeating, you might want to use a cache for the UI and then replace the input when a certain type has been opened before. There is a ready to be used Cache for the default Tree Master Detail Factory.

Best regards


Get professional Eclipse developer support:
Re: [EMF Forms] Render asynchronously [message #1753510 is a reply to message #1751127] Tue, 07 February 2017 10:58 Go to previous message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 76
Registered: September 2016
Follow-up: I blogged about the replacement of the input:
and about the cache:

Get professional Eclipse developer support:
Previous Topic:[EMF Forms] ViewModels - GenericEditor
Next Topic:[EMF Forms] Instance model changes in e4
Goto Forum:

Current Time: Thu Jul 19 15:27:41 GMT 2018

Powered by FUDForum. Page generated in 0.01884 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top