Since GWT is compiled to JavaScript, runtime performance for heavy computations is highly dependent on the JavaScript engine performance.
On which browser is this happening? For your heavy computation you might want to consider rewriting it to use JavaScript semantics (e.g. JsArray) instead of Java semantics since all Java semantics have to be emulated in JavaScript and this comes with some overhead. There is always the options to profile the actual code with a JavaScript profiler (Chrome developer tools) to find out why its actually slow. Maybe you can post the relevant part of your algorithm so we can point you in the right direction. -Daniel 2012/12/16 Bhaskar Janakiraman <[email protected]> > Perhaps you are running into limitations imposed by Javascript on GWT? See: > > https://developers.google.com/web-toolkit/doc/latest/DevGuideCodingBasicsCompatibility > > > On Saturday, December 15, 2012 4:49:25 PM UTC-8, Sami Kanderian wrote: >> >> Dear all, >> >> I am having the opposite problem than what is reported by most of you and >> would appreciate some advice. I am fairly new to GWT and wrote my first app >> that runs entirely client side. When a button is clicked it does tens or >> even hundreds of thousands flops that are mathematical computations and >> outputs the result. I have placed timers in the code and this computation >> algorithm takes 2 seconds to run in developer mode (i.e when it runs in >> Java). This run time is acceptable. However, when I GWT compiled the >> app (into JavaScript) and run it on the web, the same computation function >> takes 25 seconds. This latency is unacceptable. My question is what’s the >> best way to resolve this? I see 2 potential options and wouls appreciate >> some advice on which way I should go and if there are alternative options I >> am missing: >> >> *Option 1:* >> >> - - Should I switch the computation functions to run server >> side? >> >> - How much time does it take the server to send 5,000 doubles >> back to the client? >> >> *Option 2:* >> >> - - Should I scratch GWT and the whole JavaScript >> conversion/compilation and just have the whole thing run in Java client >> side in an applet? I am bummed as I chose GWT as to have the App run on >> many different platforms that do not accept the Java Run Time Engine. >> >> - I like the GUI I am using, can GWT and Smart GWT GUIs run a Java >> Applet (i.e can I use the same GUI I created with GWT but run the core >> components of the app in Java, basically run like it does in developer mode >> now but as the finished app?) >> >> Thanks in advance! >> >> Sami >> > -- > 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/-/ngNj_ZFK9PMJ. > > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
