|Re: [Edapt] UI freezes when comparing ecore files (with history) [message #1796504 is a reply to message #1796017]
||Mon, 15 October 2018 12:54
| Paul Reuter
Registered: December 2015
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.
void filter(java.util.List<org.eclipse.emf.ecore.resource.Resource> leftResources,
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.
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.
Powered by FUDForum
. Page generated in 0.01820 seconds