Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] Performance problem with containment
[Teneo] Performance problem with containment [message #1714754] Mon, 16 November 2015 12:15 Go to next message
Mig Per is currently offline Mig PerFriend
Messages: 2
Registered: November 2015
Junior Member
Hello everybody,

we are having experimenting performance problems with containment . We are trying to load a list (ecore object) . I am uploading the file from the model we have.
When we are trying to access to the file for a query, our query takes more than 8 seconds to be loaded with 225 documents. If we make these query separate directly in postgres (the db we are using) it takes only 300ms but it will be also not checking document successor and predecessors.

I will also upload the PostgreSQL logfile with the properties statement_log=all in order to see all the queries that pg is recieving and we think they are so many:
2 Seconds for loading the database definition
684 calls
5 Seconds for load Document / DocumentData entries
451 calls
2 Seconds for load content of Document fields (successors, predecessors, datachannels)
675 calls

and the code use to call is:
    public Collection<EObject> query( final EClass eClass, final List<OrderColumn> orderBy, final Range range,
            final AdaptableQueryFilter filter ) throws VitasystemsException
    {
        Collection<EObject> resultset = Collections.emptyList();

        final EntityManager em = getEntityManager();

        try {
            final Query query = buildQuery( em, eClass, orderBy, filter );

            if( range != null ) {
                // TODO Move this check directly into the Range class
                if( range.getFrom() < 0 || range.getCount() < 0 ) {
                    throw new IndexOutOfBoundsException(
                            "Range index out of boundes. All parameters must be positive." );
                }

                query.setFirstResult( range.getFrom() );
                query.setMaxResults( range.getCount() );
            }

            resultset = Collections.unmodifiableList( query.getResultList() );
            resolveCrossReferences( resultset );
        }
        finally {
            em.close();
        }

        // We intentionally cut all reference as we do not want to rely on the lazy-loading
        // mechanism for any type of references. It loads ALL referenced entites, but we only
        // want to load a certain number of them.
        return cutReferences( resultset );
    }


There is something we are making in not a correct way I suppose, but I have no idea where should I start with that. Can somebody help me to improve that query (nor Teneo config) because more than 8 seconds response is not appropriate for a webapp.

Many thanks for your replies. if anyone need more information I will try to show all we have here.
Re: [Teneo] Performance problem with containment [message #1718727 is a reply to message #1714754] Tue, 29 December 2015 13:44 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Per,
Sorry I missed your post, let me know if still relevant then I will take a look.

gr. Martin
Re: [Teneo] Performance problem with containment [message #1718761 is a reply to message #1718727] Tue, 29 December 2015 21:02 Go to previous message
Mig Per is currently offline Mig PerFriend
Messages: 2
Registered: November 2015
Junior Member
Hi Martin,
Thank you for the reply, the post still relevant for me.

happy christmas!
Miguel Perez
Previous Topic:[Texo] Mars
Next Topic:How to automatically arranging Ecore diagrams
Goto Forum:
  


Current Time: Fri Mar 29 02:25:17 GMT 2024

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

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

Back to the top