[Teneo] Performance problem with containment [message #1714754] |
Mon, 16 November 2015 12:15 |
Mig Per 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.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03511 seconds