Why save all resources in DAnalysisSession [message #1790079] |
Mon, 04 June 2018 08:54  |
Eclipse User |
|
|
|
Hi,
I'm analyzing sirius models saving performance. In my test scenario, i have a model with many representations, i extract each representation to a separated .aird file, then analyze the saving process.
I found that when i edit in a diagram, than save it, the system will save all aird files in the same session.
When i analyze the source codes, i found in DAnalysisSessionImpl.doSave() function, it add all session resources, semantic resources and controlled resources to a set, then get a saving policy (IsModifiedSavingPolicy) to save these resources. In IsModifiedSavingPolicy, it compute which resource need to do save, in its filter, it get resources which has been logically modified, and get resources which references to the logically modified resources.
For example, resource A is logically modified, resource B and C are not changed, but B and C reference to A, so it save all A, B and C.
Is there any reason to save B and C? I want to comment out save B and C, but i'm afraid it bring some mistakes.
|
|
|
|
|
Re: Why save all resources in DAnalysisSession [message #1790132 is a reply to message #1790128] |
Tue, 05 June 2018 12:01  |
Eclipse User |
|
|
|
Hi
If you are using Xpath then my comments may be totally irrelevant. But since this is the Sirius newsgroup and AFAIAA Sirius exploits EMF, which has no support for Xpath, I would expect normal EMF policies to apply to saving,.
While you might use Xpath for some references, are you sure that EMF references are not used for others.
Either way if you are saving Resources from a ResourceSet, EMF can save them all to memory, compare with the file system and only actually write those that are changed.
Regards
Ed Willink
|
|
|
Powered by
FUDForum. Page generated in 0.03662 seconds