My question was related to documentation, because I've heard you to say that some RF parts are working "by design", so I was wondering where there is a such a document, that describes it. I know that GWT project has some Wiki pages about RF, but non of them is explaining in details the format of the request/response messages.
I'm digging into the source, to find out how the things are working and to find a way to make some optimization on the server side, cause It's really slow. 50 small entities are serialized in ~10 seconds on GAE, where with GSON, the serialization takes 300 ms. I made profiling of a simple request that doesn't accept any parameters and returns 50 entities.
public void testMethodReturningLargeDataSet() {
delayTestFinish(DELAY_TEST_FINISH);
SimpleFooRequest request = simpleFooRequest();
final long start = System.currentTimeMillis();
request.returnValueProxies().to(new Receiver<List<SimpleValueProxy>>() {
@Override
public void onSuccess(List<SimpleValueProxy> response) {
long end = System.currentTimeMillis();
System.out.println("Size: " + response.size() + " Time: " + (end - start) + " ms");
}
}).fire();
}
Result time of this test is: Size: 50 Time: 1336 ms, where with gson, the serialization time of this 50 objects is ~ 300 ms which means that RF is 4 times slower then the simple json serialization.
The profiler is saying that: SimpleRequestProcessor.process method is taking 58% of the processing time, where:
createReturnOperations - 20%
- EntityCodex.encode 10%
- AutoBeanUtils.getAllProperties() 4%
- setTypeToken - 2%
- Other invocations - 3%
processInvocationMessages - 37%
- resolveClientValue - 28%
- ServiceLayerDecorator.invoke (Service method invocation) - 1 ms (0%)
- EntityCodex.encode - 9%
Thomas, do you have any thoughts about some optimizations of RF ?