Skip to content

[Bugfix] Use four instead of one ResourceSet in performance benchmark#1

Open
dstrueber wants to merge 1 commit intolbeurerkellner:masterfrom
dstrueber:packages
Open

[Bugfix] Use four instead of one ResourceSet in performance benchmark#1
dstrueber wants to merge 1 commit intolbeurerkellner:masterfrom
dstrueber:packages

Conversation

@dstrueber
Copy link

@dstrueber dstrueber commented Jun 13, 2020

In the unfixed version, the performance benchmark loads each of the four pairs of metamodels into the same resource set (within the "getModel()" method). The problem is that the metamodels have the same namespace URIs over the different scenarios, violating a global assumption of EMF: ResourceSet.getPackageRegistry().getEPackage(nsURI) returns a single package, and not a list of packages. Since my code relies on this global assumption, I submit a fix, which ensures that each pair of metamodels (together with the instances) is loaded into a separate ResourceSet.

In the unfixed version, the performance benchmark loads each of the four pair of metamodels into the same resource set (within the "getModel()" method). This appears to violate a global assumption of EMF: ResourceSet.getPackageRegistry().getEPackage(nsURI) returns a single package, and not a list of packages. Since my code relies on this global assumption, I submit a fix, which ensures that each pair of metamodels (together with the instances) is loaded into a separate ResourceSet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant