When it started in 2007, EMFCompare 1.x was designed to compare models that could fit entirely in memory. Since then, EMF has been used to design bigger and bigger models, to the point that they can sometimes barely fit entirely in a laptop's memory. EMFCompare 1.x is irrelevant to compare such big models because its comparison engine needs to handle 2 or 3 versions (three-way diff) of the models under comparison.
To be able to work with such large models, models are often split in multiple resources to form a set of strongly connected components in a way that a single component can fit entirely in memory. Yet EMFCompare 1.x cannot handle strategies adapted to these models such as not loading the entire model in memory or loading it piece after piece.
EMFCompare 2 is a rewrite from scratch with scalability in minds. It now has a smart scope feature to leverage the above strategies. It only loads the fragments susceptible to have changed and then compares only these parts. This way, EMFCompare 2 is able to compare models with millions of elements in a number of steps proportional to the number of differences.
During this talk, we will introduce you to the new framework and how we now are able to scale to millions. This will be shown with a lot of demo in support. We will also show you the brand new user interface that has been revamped to scale along with the new engine.
36. Summary
Build the graph of
resources
Smart resolve all
37. Summary
Find which
Build the graph of
resources has
resources
changed
Smart resolve all
38. Summary
Find which
Build the graph of
resources has
resources
changed
Binary comparison
Smart resolve all
of resources
39. Summary
Find which
Build the graph of Compare resource
resources has
resources with differences
changed
Binary comparison
Smart resolve all
of resources
40. Summary
Find which
Build the graph of Compare resource
resources has
resources with differences
changed
Match, Diff, etc.
Binary comparison
Smart resolve all without resolving
of resources
proxies
41. Kill two pigs with one (angry) bird
http://extremehdwallpapers.com/wp-content/uploads/2012/08/angry-birds-wallpaper-hd-.jpg
44. Number of fragments (resources) Number of EObjects Disk Usage (XMI files size)
10000 10000K 1000M
1000 1000K
100M
100 100K
10M
10 10K
Small Medium Large Small Medium Large Small Medium Large
Sample Models The numbers (x2 in 2-ways, x3 in 3-ways)
45. The
promised millions
Number of fragments (resources) Number of EObjects Disk Usage (XMI files size)
10000 10000K 1000M
1000 1000K
100M
100 100K
10M
10 10K
Small Medium Large Small Medium Large Small Medium Large
Sample Models The numbers (x2 in 2-ways, x3 in 3-ways)
46. Small Medium Large
120
90
CPU Usage
Time (sec)
60
Some changes in 1 resource
30
1 10 100
number of changes
47. Small Medium Large
120
90
CPU Usage
Time (sec)
60
1 change in some fragments
30
1 5 10 20
number of changed fragments
48. 600
450
Max Heap (MiB)
Memory Usage
300
Max Heap (-Xmx512m)
150
0
Small Medium Large
identity == id currently\ncontent based (heuristics) still to come\n
detect differences between matched elements\n\nComputer History Museum The difference engine\nan automatic, mechanical calculator designed to tabulate polynomial functions) based upon the designs of Charles Babbage\n
between differences => what has to be merged when the current diff is asked to be\n
what differences has to be marked as merge if one is asked to be\neOpposite\n
detecting conflict between differences when doing a three-way comparison (SCM)\n
automatically (accept all changes) resolve conflicts... \n
\n
\n
\n
\n
references between EObject that cross the boundaries of resources\n
let’s try to compare three resource set\n
\n
\n
this is the basic idea to reduce memory consumption AND cpu\nonly few of the resources have to be really loaded and compared\nbut still, no idea of the graph of resources before the comparison\nif we load resource set one by one to detect graph of resources, still take a lot of time and memory\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
this is the basic idea to reduce memory consumption AND cpu\nonly few of the resources have to be really loaded and compared\nbut still, no idea of the graph of resources before the comparison\nif we load resource set one by one to detect graph of resources, still take a lot of time and memory\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
logarithmic scale, see, each sample is an order of magnitude bigger than the previous one.\ntwo metrics to see how we scale: several modifications in 1 fragments, 1 modifications in several fragments. \n
\n
\n
2GB with Medium in 1.3\n
\n
\n
\n
from 1.3\n
\n
A (fast) Generic one, you can plug in your own already\n
and see the differences required to be merged when merging one\n
milestones before, the performance presented here are from the master\n