[
https://issues.apache.org/jira/browse/OLINGO-527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14318669#comment-14318669
]
Karuna Joshi commented on OLINGO-527:
-------------------------------------
Hi Chandan,
around 15000 records fetched from DB. we tried to set the limit to fetch around
3000 record at a time using eclipselink <fetch-size> property in
persistence.xml. we also try to use SKIP AND TOP in data request url.
The main problem is, even if we bear the delay in large number of records being
fetched (in subsequent hit its taking very less time ) , the time taken to
build the response for such a huge dataset is very large. Time taken to build
the response is large, when we use $expand in request. But without expand if
the same number of records are fetched, build response time is very very less.
I looked into the olingo code where it build response and found that major time
is taken in AtomEntryEntityProducer::append function. which is being called in
for loop for each entry in data map.
specially in this block of AtomEntryEntityProducer::append
else {
// write all links
if (!properties.isContentOnly()) {
appendAtomEditLink(writer, eia, data, selfLink);
appendAtomNavigationLinks(writer, eia, data);
} else {
appendAdditinalLinks(writer, eia, data);
}
// write properties/content
appendCustomProperties(writer, eia, data);
writer.writeStartElement(FormatXml.ATOM_CONTENT);
writer.writeAttribute(FormatXml.ATOM_TYPE,
ContentType.APPLICATION_XML.toString());
appendProperties(writer, eia, data);
writer.writeEndElement();
}
this block call appendAtomNavigationLinks() function which in turn call the
same append function in turn.
wanted to know is there anything we are missing, or should do to improve the
time taken to build the response ? can it be related to JPA entity relationship
we define ?
we can not use delta token feature as user can request any data any resource.
we can not be sure about what should be our delta in advance.
Thank you !
> Is there any possible ay to reduce build response time of JPA query
> --------------------------------------------------------------------
>
> Key: OLINGO-527
> URL: https://issues.apache.org/jira/browse/OLINGO-527
> Project: Olingo
> Issue Type: Question
> Reporter: Karuna Joshi
>
> We have a very large data base and we are exposing the data using olingo
> restful web service. when I compare, time taken to execute the same query via
> jdbc connection and time taken by olingo, there is a significant difference.
> Time taken by Olingo is very large.
> Time taken to process JPA query + Time taken to build response is the total
> time taken by olingo.
> We try to tune the JPA queries using Query hints, but still build response
> time is also very large.
> I have a question :
> Is there any way we can reduce the time taken to build the response ?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)