
google-web-toolkit - issue #7231
RequestFactory bad performance when using ValueProxy's and large object graph's
GWT Release 2.4.0
Detailed description:
RequestFactoryServlet performance becomes really bad when sending many objects containing ValueProxy's (about 20 sec. when sending 1000 ValueProxy's, but about 2 sec not using ValueProxy's).
The problem is probably in line 267 in SimpleRequestProcessor.createReturnOperations It is probably not necessary to see if the ValueProxy's have been persisted in the meantime. Adding this check to the if statement in line 265 fixes the problem: !ValueProxy.class.isAssignableFrom(bean.getType())
Shortest code snippet which demonstrates issue (please indicate where actual result differs from expected result):
see testcase in attached file.
Workaround if you have one:
Don't use value proxy's when sending a large object graph
Links to relevant GWT Developer Forum posts: http://groups.google.com/group/google-web-toolkit/browse_thread/thread/a38a816f0984ed80/3199a8b11c7b1c8f#3199a8b11c7b1c8f
Link to patch posted at http://gwt-code-reviews.appspot.com:
Comment #1
Posted on Mar 5, 2012 by Swift Rhino(No comment was entered for this change.)
Comment #2
Posted on Mar 10, 2012 by Swift RhinoComment #3
Posted on Mar 12, 2012 by Massive HorseHello, I used the provided patch and I'm not sure that it fixes completely the performance issue. Here is a screenshot for a request that loads ~40 records (Value Objects) in 10 seconds.
Here is the structure of the objects which I'm loading: https://gist.github.com/2022453 . Please note that MyMainValueProxy has maximum 3 items of Child1 or Child2.
Second attachment is displaying the performance when GWT-RPC is used for the same number of rows of the same type.
Comment #4
Posted on May 15, 2012 by Swift Rhinor10974
Let's mark this issue as fixed, as we indeed fixed some performance issue.
It's unclear to me whether MGenov's issue is related to ValueProxies or to RequestFactory more globally. Ideally we'd need some profiling numbers, so let's create a new issue when/if we have them.
Comment #5
Posted on Jun 27, 2012 by Happy ElephantBulk edit: should be fixed in the GWT 2.5 release candidate.
Status: Fixed
Labels:
Category-RPC
Milestone-2_5