Bug 517046 - Performance problem ComparisonSpec
Summary: Performance problem ComparisonSpec
Status: UNCONFIRMED
Alias: None
Product: EMFCompare
Classification: Modeling
Component: Core (show other bugs)
Version: 3.2.0   Edit
Hardware: PC Windows 7
: P3 normal with 5 votes (vote)
Target Milestone: ---   Edit
Assignee: EMF Compare CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-22 04:01 EDT by Adam Bialas CLA
Modified: 2017-09-07 10:31 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Bialas CLA 2017-05-22 04:01:55 EDT
In my application I merge big models (files of about 3MB size). I have encountered poor performance during difference calculation. Using JProfiler, have I discovered that a lot of time is spent inside the getInverseReferences(...) method of ComparisonSpec class. The result object inside is EList<Diff>, which takes a lot of time when adding a new element to the list (with a lot of elements already in it). I created my custom implementation, which uses HashSet instead of EList, and on the return I create EList based on this HashSet. In this case it is much faster.
Comment 1 Laurent Goubet CLA 2017-09-07 10:31:29 EDT
For the record, this bug was created as a follow up on discussion on https://www.eclipse.org/forums/index.php?t=msg&th=1086483&goto=1767589& .

There are a few ways things could be improved here:

* multi-threading the LCS computation
* Check why the ProximityEObjectMatcher "looks like" it's doing way more work than necessary. for example when comparing a huge model with an empty one, there shouldn't be that many look-ups when basically nothing can be matched (matchAheadOfTime seemed to be the culprit)
* Determine per-use-case customization that need to be done for client models

This is overall something that we do not plan on looking after for now.