Home » Modeling » EMF » Teneo persistency - performance questions
Teneo persistency - performance questions [message #420109] |
Wed, 18 June 2008 10:23 |
Balazs Molnar Messages: 28 Registered: July 2009 |
Junior Member |
|
|
Hello,
I have taken the Library example and loaded some data (around 100 writers
and about 10000 books.
I tested both JPOX and HIBERNATE persistency options with default
configurations with Derby.
My aim was to find out some of the loading and query attributes of the
solution and compare them on my desktop - focusing on comparison not
really on absolute performance.
I found the followings:
(JPOX)
- it took JPOX to load the above amount of data around 24 minutes!
- modifying the Library aggregation of Books
(theLib.getBooks().add(aBook); ) were efficient as compared to Hibernate -
under one second !
(HIBERNATE)
- it took Hibernate to load the data 3 minutes!
- modifying the Library aggregation of Books - same as in JPOX code above
- took 42 seconds!
My questions:
- is there a known way to make loading "larger" data volume using JPOX
faster ?
- can I make the manipulation of larger aggregates (e.g. Library.books)
faster with Hibernate ? Or Should I avoid using aggregates with larger
collections ?
- is there a preferred Teneo persistency solution ? I have noticed the
supported JPOX version is not the latest one while Hibernate seems to work
with latest Hibernate versions ? Is there a reason for this ?
- When experimenting with Hibernate I attempted to set the persistency
option and it failed, can someone help me on what I am doing wrong ?:
>
hibernateProperties.setProperty(PersistenceOptions.MAP_ALL_L ISTS_AS_IDBAG,
"true");
and it caused an exception at
>HbSessionDataStore.initialize
with the exception:
Exception in thread "main" org.hibernate.MappingException: invalid mapping
at org.hibernate.cfg.Configuration.addXML(Configuration.java:44 4)
at
org.eclipse.emf.teneo.hibernate.HbSessionDataStore.mapModel( HbSessionDataStore.java:156)
at
org.eclipse.emf.teneo.hibernate.HbSessionDataStore.initializ e(HbSessionDataStore.java:73)
at hu.f400.emf.teneo.test.hbtutorial.Tutorial1.main(Tutorial1.j ava:116)
Caused by: org.xml.sax.SAXParseException: The content of element type
"class" must match
" (meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id |composite-id),discriminator?,natural-id?,(version|timestamp )?,(property|many-to-one|one-to-one|component|dynamic-compon ent|properties|any|map|set|list|bag|idbag|array|primitive-ar ray)*,((join*,subclass*)|joined-subclass*|union-subclass*),l oader?,sql-insert?,sql-update?,sql-delete?,filter*,resultset *,(query|sql-query)*) ".
|
|
|
Re: Teneo persistency - performance questions [message #420159 is a reply to message #420109] |
Thu, 19 June 2008 14:26 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Balázs,
The idbag related exception is a bug. I have solved it and checked it in cvs. I will come back later
today/tomorrow to you on the performance comparipart of your post.
With the term 'load' in your post, you mean store in the db, correct?
The JPOX version is lagging behind because going from 1.1.9 to 1.2.0 (and the datanucleus platform)
the internal api of jpox has been changed completely. It is a fair amount of work for me to make
this transition. In combination with the lesser popularity of jpox this has resulted in that jpox
support has not been upgraded (although I promised a few times :-(. The only thing I can say that
the jpox support will be upgraded but when I don't know (if someone asks for it every week it will
probably go faster).
So for now hibernate support is more complete. The idbag should help in the performance of updates
on large collections. In addition hibernate has the concept of extra-lazy collections, these are
however not yet support with Teneo (but has been requested:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=221288).
gr. Martin
Balázs Molnár wrote:
> Hello,
>
> I have taken the Library example and loaded some data (around 100
> writers and about 10000 books.
> I tested both JPOX and HIBERNATE persistency options with default
> configurations with Derby.
> My aim was to find out some of the loading and query attributes of the
> solution and compare them on my desktop - focusing on comparison not
> really on absolute performance.
>
> I found the followings:
> (JPOX)
> - it took JPOX to load the above amount of data around 24 minutes!
> - modifying the Library aggregation of Books
> (theLib.getBooks().add(aBook); ) were efficient as compared to Hibernate
> - under one second !
>
> (HIBERNATE)
> - it took Hibernate to load the data 3 minutes!
> - modifying the Library aggregation of Books - same as in JPOX code
> above - took 42 seconds!
> My questions:
> - is there a known way to make loading "larger" data volume using JPOX
> faster ?
> - can I make the manipulation of larger aggregates (e.g. Library.books)
> faster with Hibernate ? Or Should I avoid using aggregates with larger
> collections ?
> - is there a preferred Teneo persistency solution ? I have noticed the
> supported JPOX version is not the latest one while Hibernate seems to
> work with latest Hibernate versions ? Is there a reason for this ?
> - When experimenting with Hibernate I attempted to set the persistency
> option and it failed, can someone help me on what I am doing wrong ?:
> >
> hibernateProperties.setProperty(PersistenceOptions.MAP_ALL_L ISTS_AS_IDBAG,
> "true");
> and it caused an exception at >HbSessionDataStore.initialize
> with the exception:
>
> Exception in thread "main" org.hibernate.MappingException: invalid mapping
> at org.hibernate.cfg.Configuration.addXML(Configuration.java:44 4)
> at
> org.eclipse.emf.teneo.hibernate.HbSessionDataStore.mapModel( HbSessionDataStore.java:156)
>
> at
> org.eclipse.emf.teneo.hibernate.HbSessionDataStore.initializ e(HbSessionDataStore.java:73)
>
> at hu.f400.emf.teneo.test.hbtutorial.Tutorial1.main(Tutorial1.j ava:116)
> Caused by: org.xml.sax.SAXParseException: The content of element type
> "class" must match
> " (meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id |composite-id),discriminator?,natural-id?,(version|timestamp )?,(property|many-to-one|one-to-one|component|dynamic-compon ent|properties|any|map|set|list|bag|idbag|array|primitive-ar ray)*,((join*,subclass*)|joined-subclass*|union-subclass*),l oader?,sql-insert?,sql-update?,sql-delete?,filter*,resultset *,(query|sql-query)*) ".
>
>
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
| | | | |
Goto Forum:
Current Time: Fri Mar 29 13:11:59 GMT 2024
Powered by FUDForum. Page generated in 0.02551 seconds
|