Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Edapt] UI freezes when comparing ecore files (with history)
[Edapt] UI freezes when comparing ecore files (with history) [message #1795912] Tue, 02 October 2018 09:24 Go to next message
Paul Reuter is currently offline Paul ReuterFriend
Messages: 6
Registered: December 2015
Junior Member
As part of our workflow for integrating model changes from 3rd parties, I regularly have to open a comparison editor with ecore files from different sources.

If there is a largeish edapt history file (~4MB in our case) associated with one of the ecore files, the entire IDE will become completely unresponsive for up to 15 minutes.

This does not happen when either the ecore file or the history file is relocated to a different directory, so the smoking gun points to edapt involvement.

It also does not happen with small history files, so I suspect the comparison tries to match history entries n-to-n without any pruning.

When the comparison editor finally opens, there is no useful information with respect to the history. Even if the files are nearly identical and only divergent on the last release, all history entries will be marked as addition or deletion, with no corresponding entries matched.
Re: [Edapt] UI freezes when comparing ecore files (with history) [message #1796016 is a reply to message #1795912] Thu, 04 October 2018 07:49 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 111
Registered: September 2016
Senior Member
Hi,

this lloks like a Bug, could you create a BR and a test set-up to reproduce this?

Best regards,
Jonas


--
Jonas Helming
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [Edapt] UI freezes when comparing ecore files (with history) [message #1796017 is a reply to message #1796016] Thu, 04 October 2018 07:58 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Looks like a 'simple' case of not using a worker thread.

A Visual VM thread dump at the point the UI is unresponsive should be enough to identify the guilty code path.

Regards

Ed Willink
Re: [Edapt] UI freezes when comparing ecore files (with history) [message #1796504 is a reply to message #1796017] Mon, 15 October 2018 12:54 Go to previous message
Paul Reuter is currently offline Paul ReuterFriend
Messages: 6
Registered: December 2015
Junior Member
Apologies for the delay. I have looked at a thread dump in Visual VM and can confirm that there is indeed the expected issue of not using a worker thread. The guilty code path is completely in the EMF compare project, the issue has been known for a while: Bugzilla with similar issue, but no Edapt

A stopgap measure suggested is to "Disable model resolution" in the EMF Compare preferences (Resolution strategy). I can confirm this works in this case as well.

This will prevent the history files from participating in the comparison. Unfortunately, it will also prevent all other logical model parts from participating ( genmodel, gmfgen, uml etc ), so I will need to toggle this often.

The planned resolution to the UI freeze will involve not showing any content in the editor until the calculations are done. This will make the rest of the UI responsive, but the long delay until the comparison becomes ready remains (including maximal CPU usage and fan action). Therefore I have added a new Bugzilla entry that does not specifically address the UI freeze.

Getting the history comparison customized to the point that it is both fast and useful is probably a lot of work for little payoff. As a quicker fix, perhaps the participation of history files in the comparison can be disabled in general?

I did not find anything specific on how to restrict the search scope in the EMF Compare developers guide, but I did find the extension point org.eclipse.emf.compare.match.resourcefilters that looks suitable:
 
public interface IResourceFilter
This interface describes the contract for resource filters that can be provided through the extension point org.eclipse.emf.compare.match.resourcefilters. Note that this filter will only be called when comparing models through the EMF Compare API or the MatchService doResourceSetMatch() methods.

Method Detail
void filter(java.util.List<org.eclipse.emf.ecore.resource.Resource> leftResources,
            java.util.List<org.eclipse.emf.ecore.resource.Resource> rightResources)
This method will be called by the framework with the list of all resources present in the compared resourceSets for two way comparison. Clients should remove the undesired resources from the parameter lists.
Parameters:
leftResources - Resources contained by the ResourceSet of the left resource.
rightResources - Resources contained by the ResourceSet of the right resource.

 


As for the test set-up, I can't release our models, so I'd need to cook something up that generates large history files. I can't promise I'll find the time in the near future.
Previous Topic:[EMF Forms] Maven artefacts
Next Topic:[Facet] Support additional query language
Goto Forum:
  


Current Time: Thu Mar 28 17:51:33 GMT 2024

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

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

Back to the top