|About CrossReferenceSerialization in Xtext [message #1791322]
||Thu, 28 June 2018 06:57
| jingjing wang
Registered: July 2017
I have a question about the serialization of cross reference in Xtext.
The class CrossReferenceSerialization in package "org.eclipse.xtext.serializer.tokens" is responsible for serializing the corss reference of semantic element. The func serializeCrossRef() has two ways to get serialization result: 1) serialize the Node in the parse tree, invoking serializeNode() func; 2) invoking getCrossReferenceNameFromScope(). And my question is about getting serialization result from invoking getCrossReferenceNameFromScope().
In our analysis, we find that it will get a scope which contain all the EObjectDescription of the resource, then traverse these EObjectDescription to get the matched EObjectDescription which is related with the semantic element, and can get serialization result. So if the model scale is very large, the match process will be slow and inefficient, which contribute to very slowly cross reference serialization.
1. Why not creating only one EObjectDescription according to the semantic element and then get serialization result from this EObjectDescription, which can avoid the performance overhead of traversing all EObjectDescription of smeantic model?
2. And whether there are some scenes that one semantic element can have several EObjectDescription? So if there are, the process of traversing is necessary and important, can you give a detail description about these scenes?
Thank you very much!
Powered by FUDForum
. Page generated in 0.01730 seconds