Sunday, February 26, 2012

Re: slow passing json back

bhomass,

Were you in Dev Mode? In Dev Mode, simple deserialization activities
can take far longer than you'd expect because it must keep running
back to the emulated javascript in the Eclipse JVM and back to the
browser. Usually these activities will run far faster in production
mode. For example, I had to deserialize about 20k objects that came
back in a 110KB RPC. In Dev Mode it took about 30s, in Prod Mode it
took 100ms.

As a solution, we use Spring4GWT's mock service option, so that in
Production Mode RPCs run to our actual Tomcat/Java backend code, but
in Dev Mode they hit a mock version of the same service. This way, we
return 1 month of mock data if running in Dev Mode and the whole 5
years (20K objects) from the actual DB if running in Prod Mode. This
way we still get our dev work done quickly and the app still runs
correctly in production.

I hope that helps.

Sincerely,
Joseph


On Feb 24, 10:11 pm, bhomass <bhom...@gmail.com> wrote:
> I have been carefully studying my code to see what is taking so long
> to load a page. It turns out it took 4.5 secs to pass back 19k
> characters (in javascript) using the gwt rpc.
>
> Is this considered an enormous amount of javascript code? anything I
> can do to speed up the transmission?

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment