Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » emf.ecore.resource.ResourceSet.getResource takes more time in VIRGO(emf.ecore.resource.ResourceSet.getResource takes more time in VIRGO)
emf.ecore.resource.ResourceSet.getResource takes more time in VIRGO [message #1209197] Mon, 25 November 2013 11:37 Go to next message
Chandre Gowda is currently offline Chandre GowdaFriend
Messages: 56
Registered: April 2013
Member
Hi,

The following code takes around 1 second for every call in VIRGO server. But takes few milliseconds during eclipse run. Also I found that if I add the resource loading logic in my Activator, which is triggered during virgo server startup, the time taken is very less (~0.4 sec).

Resource resource = org.eclipse.emf.ecore.resource.ResourceSet.getResource(uri, true);

Please see the below link for more details.
http://www.eclipse.org/forums/index.php/t/593004/

Any suggestions on how to debug this or performance optimization is highly appreciated.

Thanks
Chandru
Re: emf.ecore.resource.ResourceSet.getResource takes more time in VIRGO [message #1209369 is a reply to message #1209197] Mon, 25 November 2013 13:25 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31770
Registered: July 2009
Senior Member
Chandre,

What URI are you using? I.e., where is the resource you're loading located?

On 25/11/2013 12:37 PM, Chandre Gowda wrote:
> Hi,
>
> The following code takes around 1 second for every call in VIRGO
> server. But takes few milliseconds during eclipse run. Also I found
> that if I add the resource loading logic in my Activator, which is
> triggered during virgo server startup, the time taken is very less
> (~0.4 sec).
> Resource resource =
> org.eclipse.emf.ecore.resource.ResourceSet.getResource(uri, true);
>
> Please see the below link for more details.
> http://www.eclipse.org/forums/index.php/t/593004/
>
> Any suggestions on how to debug this or performance optimization is
> highly appreciated.
>
> Thanks
> Chandru


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: emf.ecore.resource.ResourceSet.getResource takes more time in VIRGO [message #1210682 is a reply to message #1209369] Tue, 26 November 2013 04:18 Go to previous messageGo to next message
Chandre Gowda is currently offline Chandre GowdaFriend
Messages: 56
Registered: April 2013
Member
URI is a path to simple xml file which is available in the same system, so I think we can avoid looking at networking latency as a factor.
Following line gives the URI.
URI uri = URI.createFileURI(file.getAbsolutePath());

Thanks
Chandru
Re: emf.ecore.resource.ResourceSet.getResource takes more time in VIRGO [message #1211132 is a reply to message #1210682] Tue, 26 November 2013 09:22 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31770
Registered: July 2009
Senior Member
Chandru,

Perhaps Virgo involves more security manager overhead to access the file
system. You can see that
org.eclipse.emf.ecore.resource.impl.FileURIHandlerImpl.createInputStream(URI,
Map<?, ?>) basically just uses a FileInputStream so why that would be
slower isn't clear.

On 26/11/2013 5:18 AM, Chandre Gowda wrote:
> URI is a path to simple xml file which is available in the same
> system, so I think we can avoid looking at networking latency as a
> factor.
> Following line gives the URI.
> URI uri = URI.createFileURI(file.getAbsolutePath());
>
> Thanks
> Chandru


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: emf.ecore.resource.ResourceSet.getResource takes more time in VIRGO [message #1213370 is a reply to message #1211132] Wed, 27 November 2013 07:56 Go to previous message
Florian Waibel is currently offline Florian WaibelFriend
Messages: 164
Registered: June 2010
Senior Member
Please let's join our efforts to not waste unnecessary time on this.

[Updated on: Wed, 27 November 2013 07:57]

Report message to a moderator

Previous Topic:[EMF Client Platform] ViewModel adding children references
Next Topic:[EMF/Edit][Teneo] Call to AdapterFactoryEditingDomain.getEditingDomainFor(eObject) returns null, eOb
Goto Forum:
  


Current Time: Sat Feb 27 10:59:12 GMT 2021

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

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

Back to the top