Re: Sending large nested DTO object over RPC - Browser freezes
How long does it take when you run the compiled code? I think the hosted mode could be the problem here. On 15 Jun., 22:34, ciosbel andrew...@gmail.com wrote: Try to use this to better inspect RPC serialization/deserialization and round trip timings.http://code.google.com/p/gwt-debug-panel/ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Sending large nested DTO object over RPC - Browser freezes
You probably can try the com.google.gwt.rpc.RPC module though it has been experimental for awhile. It seems to be a more efficient way of encoding and decoding. To use it it is almost the same as the other RPC: 1- Inherit the module: inherits name='com.google.gwt.rpc.RPC'/ 2- Have you service interface extends the com.google.gwt.rpc.client.RpcService Ex: /** * The client side stub for the RPC service. */ @RemoteServiceRelativePath(myService ) public interface MyService extends RpcService { MyComplexObject myMethod(String name); } 3- Have your implementation extends from com.google.gwt.rpc.server.RpcServlet Ex: @SuppressWarnings(serial) public class MyServiceImpl extends RpcServlet implements MyService { public MyComplexObject myMethod(String input) { return null; } } 4- You need the Async the same way as the other RPC service: Ex: public interface MyServiceAsync { void myMethod(String input, AsyncCallbackMyComplexObject callback); } This is it. On Jun 15, 9:07 am, Jonas sark...@gmail.com wrote: In my GWT program I parse a large xml file using JAXB on the server side and then convert these objects into DTO. They contain a lot of strings, doubles, and integers in a nested hierarchy. I'm using ArrayList as collection for the nested objects. The problem is that when I send this over RPC it takes around 16 seconds and the browser freezes. I first thought there was something wrong with JAXB or the DTO conversion but as you can see below they are very fast: DEBUG gwt-log:72 - - JAXB conversion time: 0.047 seconds DEBUG gwt-log:72 - - DTO conversion time: 0.015 seconds When I inspect the RPC call using FireBug I can see that the object being transferred is 4.6 kb and it says POST dispatch 111ms. When I inspect some more I can see that the function @com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::readI nt() seems to be the culprit with 5428 calls and 6654ms total time. ::getString(I), ::readDouble(), ::readLong() are also called a lot with around 3000ms each. Am I doing something wrong here or should it really be this slow? ~16 seconds for 5 kb of DTO data. It just seems wrong to me. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Sending large nested DTO object over RPC - Browser freezes
Is this in dev mode or the final compiled JS? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/2rMFOfp5uN0J. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Ang.: Re: Sending large nested DTO object over RPC - Browser freezes
This is hosted mode and on my intel core i3 work laptop. I tried the same code on my home computer and there it was much faster, around 5 seconds instead of 16. But still, far from what I had expected. I'll try and see what the speed is when deployed. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/JQJ1iPa7boAJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Sending large nested DTO object over RPC - Browser freezes
Try to use this to better inspect RPC serialization/deserialization and round trip timings. http://code.google.com/p/gwt-debug-panel/ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/0lr-oO5ZY64J. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.