0
votes

We are sending a query from a GWT client by RPC to the GAE Java server. The response is a fairly complex object tree. The RPC implementations on the server takes 900ms from start to finish. The total HTTP request is taking 4-5 seconds. We have checked that the actual transmission time and ping time is negligible. (An RPC with void resonse takes 300ms and actual transmission time is small.)

I thought maybe the serialization of the response could be taking time but when we call that explicitly on the server using RPC.encodeResponseForSuccess it takes just 50ms.

So we have 3-4 seconds overhead completely unaccounted for and I'm at a loss how to debug that. We even tried sending the serialized RPC response back using a servlet instead of RPC and sure enough the very same response took ~1s instead of 5!

Thanks!

1

1 Answers

1
votes

You're forgetting the client side serialization time for the request data and deserialization time for the response data.

Compile your app with -style PRETTY and run it through Chrome Dev Tools Profiler, IE Dev Tools Profiler or dynaTrace Ajax (http://ajax.dynatrace.com/ajax/en/) or a similar javascript profiling tool to see where your time goes.

Very large responses will take a long time to deserialize. If you use a lot of BigDecimal values in your response, because of the really complex nature of the emulation code it will take even longer (this one is a killer).