How can I speed up loading for Android when using OData?

I am trying to use Restlet for Android to query an OData data source. However, I am not impressed with my performance both in the emulator and on the real device. I have requests made in the AsyncTask shell to make the user interface responsive, but it takes another 1 minute for the final return of objects.

I get a lot of them in the LogCat window:

 10-04 18:20:41.667: DEBUG/dalvikvm(278): GC freed 7872 objects / 523928 bytes in 279ms 

What can I do to speed up query execution?

+1
java android rest odata restlet
source share
2 answers

Check out odata4j - http://odata4j.org This is an alternative odata library for java, including an android-compatible api client.

We just released a simple example for Android in our 0.3 release. This example demonstrates an efficient way to parse / swap an arbitrary odata service.

Along with service paging (mentioned by Alex), we use an efficient implementation of XML parsing to parse the odata payload (we found that heap / GC activity is the biggest bottleneck on android). A.

+4
source share

I know that this will not help you with the performance of the RESTlet library ... but:

One thing to consider is to use Service Driven Paging . Please note that this is different from $ top and $ skip (the so-called client paging), because server pages even if the client does not request it.

SDP is especially useful when a client performs an unfiltered query over a large dataset.

Thus, you can reduce this number 7872 to something more manageable.

0
source share

All Articles