Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Performance issue with URI.createGenericURI (v2.9)
Performance issue with URI.createGenericURI (v2.9) [message #1091504] Wed, 21 August 2013 15:54 Go to next message
Michael Vorburger is currently offline Michael VorburgerFriend
Messages: 103
Registered: July 2009
Senior Member
Hello,

I think URI.createGenericURI() might have a performance problem?

calling URI.createGenericURI("mdfname", fqMdfName, null) 20'000 times, with some variation for the fqMdfName but many time the same, takes.. about 10 minutes, on a fast recent machine.

if using URI.createHierarchicalURI() instead, with segments the exact same set of input creates the URIs in... 200ms! Maybe this is perfectly "normal" - but this behaviour seems a little... curious?

I've put together a full example illustrating this on https://github.com/vorburger/xtext-sandbox/blob/master/emfPerformanceCreateURI/src/ch/vorburger/emfperf/CreateURIPerformanceTest.java in case you would like to follow up on this? (It's not real problem for us anymore, as we've switched from createGenericURI to createHierarchicalURI, so I'm just posting this FYI and in case you would like to follow-up.)

This is with EMF 2.9 (I haven't tested against older releases; so unclear whether this is a regression or has always been like this).

Regards,
Michael
Re: Performance issue with URI.createGenericURI (v2.9) [message #1091527 is a reply to message #1091504] Wed, 21 August 2013 16:17 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Michael,

Yes, I'll definitely follow up on this issue. Likely it's related to:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=415311 which I'll look at
tomorrow along with your test case to make sure it's a duplicate. I
guess the test case will make it clear, but createHierarchicalURI and
createGenerateURI produce different results, so I'm not sure how you can
just switch. What exactly to the URIs look like in each case?


On 21/08/2013 5:54 PM, Michael Vorburger wrote:
> Hello,
> I think URI.createGenericURI() might have a performance problem?
>
> calling URI.createGenericURI("mdfname", fqMdfName, null) 20'000 times,
> with some variation for the fqMdfName but many time the same, takes..
> about 10 minutes, on a fast recent machine.
>
> if using URI.createHierarchicalURI() instead, with segments the exact
> same set of input creates the URIs in... 200ms! Maybe this is
> perfectly "normal" - but this behaviour seems a little... curious?
>
> I've put together a full example illustrating this on
> https://github.com/vorburger/xtext-sandbox/blob/master/emfPerformanceCreateURI/src/ch/vorburger/emfperf/CreateURIPerformanceTest.java
> in case you would like to follow up on this? (It's not real problem
> for us anymore, as we've switched from createGenericURI to
> createHierarchicalURI, so I'm just posting this FYI and in case you
> would like to follow-up.)
>
> This is with EMF 2.9 (I haven't tested against older releases; so
> unclear whether this is a regression or has always been like this).
>
> Regards,
> Michael


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Performance issue with URI.createGenericURI (v2.9) [message #1091572 is a reply to message #1091527] Wed, 21 August 2013 17:28 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Michael,

I'm not sure it's the same problem because
https://bugs.eclipse.org/bugs/show_bug.cgi?id=415311 doesn't have a test
case. But I have attached a patch that I think addresses the root
problem. You might want to have a look...

Thanks for reporting the issue and especially thanks for providing a
nice test case!


On 21/08/2013 6:17 PM, Ed Merks wrote:
> Michael,
>
> Yes, I'll definitely follow up on this issue. Likely it's related
> to: https://bugs.eclipse.org/bugs/show_bug.cgi?id=415311 which I'll
> look at tomorrow along with your test case to make sure it's a
> duplicate. I guess the test case will make it clear, but
> createHierarchicalURI and createGenerateURI produce different results,
> so I'm not sure how you can just switch. What exactly to the URIs
> look like in each case?
>
>
> On 21/08/2013 5:54 PM, Michael Vorburger wrote:
>> Hello,
>> I think URI.createGenericURI() might have a performance problem?
>>
>> calling URI.createGenericURI("mdfname", fqMdfName, null) 20'000
>> times, with some variation for the fqMdfName but many time the same,
>> takes.. about 10 minutes, on a fast recent machine.
>>
>> if using URI.createHierarchicalURI() instead, with segments the exact
>> same set of input creates the URIs in... 200ms! Maybe this is
>> perfectly "normal" - but this behaviour seems a little... curious?
>>
>> I've put together a full example illustrating this on
>> https://github.com/vorburger/xtext-sandbox/blob/master/emfPerformanceCreateURI/src/ch/vorburger/emfperf/CreateURIPerformanceTest.java
>> in case you would like to follow up on this? (It's not real problem
>> for us anymore, as we've switched from createGenericURI to
>> createHierarchicalURI, so I'm just posting this FYI and in case you
>> would like to follow-up.)
>>
>> This is with EMF 2.9 (I haven't tested against older releases; so
>> unclear whether this is a regression or has always been like this).
>>
>> Regards,
>> Michael
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Performance issue with URI.createGenericURI (v2.9) [message #1091579 is a reply to message #1091572] Wed, 21 August 2013 17:40 Go to previous message
Michael Vorburger is currently offline Michael VorburgerFriend
Messages: 103
Registered: July 2009
Senior Member
You're very welcome, I'm glad I can help / give something back!

> createHierarchicalURI and createGenerateURI produce different results,
> so I'm not sure how you can just switch. What exactly to the URIs look like in each case?

This is from deep inside old proprietary code, which handles these URIs themselves.. there is exactly one place in the code base (a helper util) which turns something internal into and back from such URIs (which are then used in EMF Proxies, only). So as long as it works bi-directionally, in this specific case, whether it's hierarchical or absolute or not is.. all the same to me! Wink
Previous Topic:xml value setting into the EMF model
Next Topic:[Teneo] Query/Update
Goto Forum:
  


Current Time: Thu Mar 28 17:49:23 GMT 2024

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

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

Back to the top