Skip to content Skip to sidebar Skip to footer

Requestfactory Slow On Android

I am using RequestFactory with appengine and android. It has been working great, however when I retrieve a list of objects of any size(around 400) it has a very delayed response.

Solution 1:

Adding to the author's description of the problem

We're retrieving 8 relatively small objects and each has one to four child objects which are tiny:

Here's an example of the stack after the response has been returned from the server, for over a minute it's in the org.json package or com.google.web.bindery and we have high cpu usage:

java.lang.AbstractStringBuilder append0 AbstractStringBuilder.java  143false   
java.lang.StringBuilder append  StringBuilder.java  125false   
org.json.JSONStringer   string  JSONStringer.java   344false   
org.json.JSONStringer   value   JSONStringer.java   252false   
org.json.JSONObject quote   JSONObject.java 713false   
com.google.web.bindery.autobean.shared.impl.StringQuoter    quote   StringQuoter.java   69false   
com.google.web.bindery.autobean.shared.impl.StringQuoter    create  StringQuoter.java   50false   
com.google.web.bindery.autobean.shared.ValueCodex$Type$13   encode  ValueCodex.java 193false   
com.google.web.bindery.autobean.shared.ValueCodex   encode  ValueCodex.java 315false   
com.google.web.bindery.autobean.shared.impl.AutoBeanCodexImpl$ValueCoder    extractSplittable   AutoBeanCodexImpl.java  500false   
com.google.web.bindery.autobean.shared.impl.AbstractAutoBean    setProperty AbstractAutoBean.java   277false   
com.google.web.bindery.autobean.vm.impl.ProxyAutoBean   setProperty ProxyAutoBean.java  253false   
com.google.web.bindery.autobean.vm.impl.BeanPropertyContext set BeanPropertyContext.java    44false   
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$3  visitValueProperty  AbstractRequestContext.java 910false   
com.google.web.bindery.autobean.vm.impl.ProxyAutoBean   traverseProperties  ProxyAutoBean.java  289false   
com.google.web.bindery.autobean.shared.impl.AbstractAutoBean    traverse    AbstractAutoBean.java   166false   
com.google.web.bindery.autobean.shared.impl.AbstractAutoBean    accept  AbstractAutoBean.java   101false   
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext    processReturnOperation  AbstractRequestContext.java 879false   
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext    processReturnOperations AbstractRequestContext.java 1215false   
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext    access$600  AbstractRequestContext.java 76false   
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$StandardPayloadDialect processPayload  AbstractRequestContext.java 347false   
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$5  onTransportSuccess  AbstractRequestContext.java 1108false   
com.whichfestival.AndroidRequestTransport   send    AndroidRequestTransport.java    68false   
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext    doFire  AbstractRequestContext.java 1102false   
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext    fire    AbstractRequestContext.java 569false   
com.google.web.bindery.requestfactory.shared.impl.AbstractRequest   fire    AbstractRequest.java    54false   
com.google.web.bindery.requestfactory.shared.impl.AbstractRequest   fire    AbstractRequest.java    59false   
com.whichfestival.FetchTopService   getEvents   FetchTopService.java    99false   
com.whichfestival.FetchTopService   onHandleIntent  FetchTopService.java    56false   
android.app.IntentService$ServiceHandler    handleMessage   IntentService.java  59false   
android.os.Handler  dispatchMessage Handler.java    99false   
android.os.Looper   loop    Looper.java 130false   
android.os.HandlerThread    run HandlerThread.java  60false

And we see the GC kick in about 25 times:

11-1622:30:28.464: D/dalvikvm(416): GC_CONCURRENT freed 930K, 51%free3321K/6727K, external1654K/2137K, paused 15ms+10ms

11-1622:30:33.605: D/dalvikvm(416): GC_CONCURRENT freed 515K, 49%free3452K/6727K, external1654K/2137K, paused 10ms+13ms

11-1622:30:37.554: D/dalvikvm(416): GC_CONCURRENT freed 638K, 49%free3497K/6727K, external1654K/2137K, paused 11ms+10ms

11-1622:30:43.424: D/dalvikvm(416): GC_CONCURRENT freed 681K, 47%free3572K/6727K, external1654K/2137K, paused 6ms+9ms

all for about 15 small pojos... would appreciate any help. Absolutely desperate to solve this.

Post a Comment for "Requestfactory Slow On Android"