Note that there are some explanatory texts on larger screens.

plurals
  1. POGWT Requestfactory performance suggestions
    text
    copied!<p>I am observing really bad performance when using GWT requestfactory. For example, a request that takes my service layer 2 seconds to fullfil is taking GWT 20 seconds to serialize. My service is returning ~100 what will be EntityProxies. Each of these objects has what will become 4 ValueProxies and 2 more EntityProxies (100 root level EntityProxies, 400 ValueProxies and 200 additional EntityProxies). However, I see the same 10x performance degradation on much smaller datasets.</p> <p>Example of log snippet:</p> <pre><code>D 2012-10-18 22:42:39.546 ServiceLayerDecorator invoke: Inoking service layer took 2265 ms D 2012-10-18 22:42:58.957 RequestFactoryServlet doPost: Entire request took 22870 ms </code></pre> <p>I have added some profiling code to the <code>ServiceLayerDecorator#invoke</code> method and wrapped the entire servlet in a timer. I have profiled the service by itself, and it is indeed returning results in ~2s. </p> <p>I am using GWT 2.4, but have tested this on GWT 2.5rc1 and GWT 2.5rc2. My backend is on GAE, but I dont think that is playing a role here.</p> <p>I found <a href="http://code.google.com/p/google-web-toolkit/issues/detail?id=7231" rel="noreferrer">this bug</a> filed against 2.4, which seems to be very related. I have manually applied the patch from <a href="https://groups.google.com/forum/?fromgroups=#!topic/google-web-toolkit/o4qBbwmE7YA" rel="noreferrer">this google group</a> without any luck.</p> <p>My domain models look like:</p> <pre><code>class Trip { protected Address origin; // becomes ValueProxy protected Address destination; becomes ValueProxy protected Set&lt;TripPassenger&gt; tripPassengers; // Set of ValueProxies } class TripPassenger { protected Passenger passenger; } class Passenger { protected Account account; } </code></pre> <p>My question is:</p> <ul> <li>Have I profiled the code correctly and isolated the problem to the GWT serialization?</li> <li>Could I be doing something wrong that would cause this behavior?</li> <li>How can I better profile the GWT serialization code to try and figure out the cause?</li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload