Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » A confuse about save resource
A confuse about save resource [message #1790001] Sat, 02 June 2018 07:57 Go to next message
mind calm is currently offline mind calmFriend
Messages: 52
Registered: July 2017
Member
Hi,

I found that, when i save a resource in Sirius, it save twice actually. The first time is at ResourceSaveDiagnose.hasDifferentSerialization function, it save resource to a temp file. The second time is the real save. This mechanism brings performance problem when resource is large.

My question is: what is the purpose of this mechanism, is it necessary?


Best regards!

by Keep Mind Calm
Re: A confuse about save resource [message #1790118 is a reply to message #1790001] Tue, 05 June 2018 12:49 Go to previous messageGo to next message
Pierre Guilet is currently offline Pierre GuiletFriend
Messages: 161
Registered: June 2017
Senior Member
Hi,

It is a very complicated, costly job to know what resources are impacted by a change from a diagram editor.
Verifying the serialized content in a temp file with the old resource content is the way to know if a resource should be saved because a change has impacted the tested resource.

We could save all the time all the resources and avoid this verification. But this is not acceptable because some users may exploit resource change information. I.e last modified date.

Indeed, saving all the time means you cannot know when the file has been effectively changed because this information will change wether there are effective changes or not.
For example, the history view in Eclipse for a resource will have as many entries as user saves. So you cannot use this view easily to know if a real change has been done or to find differences with older version.

Regards,

Pierre





Pierre Guilet - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: A confuse about save resource [message #1790120 is a reply to message #1790118] Tue, 05 June 2018 13:01 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6040
Registered: July 2009
Senior Member
Hi

EMF has smart "save via memory buffer"/"don't save if unchanged" facilities. Are you sure that these are being used appropriately? Are you sure that save options are stable and so avoiding spurious changes?

Regards

Ed Willink
Previous Topic:Edge Style Custom
Next Topic:How to custom the menu visiable in odesign
Goto Forum:
  


Current Time: Sat Sep 22 07:26:39 GMT 2018

Powered by FUDForum. Page generated in 0.01596 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top