-
1. Re: Marshalling / RPC Performance
jfuerth May 29, 2013 10:17 AM (in response to werrenmi)1 of 1 people found this helpfulHi Michel,
Thanks for bringing up this problem. Speed and efficiency are definitely among the design goals of Errai RPC.
Can you please open a JIRA for this issue? We will try to look into it during the Errai 3.0 development cycle (which is happening now).
Another possibility: if you don't need clients to handle exceptions thrown by the RPC service, you could try Errai JAX-RS. The client-side caller code would stay the same, but the server-side code would have to change a bit.
-Jonathan
-
2. Re: Marshalling / RPC Performance
werrenmi May 29, 2013 12:54 PM (in response to jfuerth)Hi Jonathan
Thanks for your reply.
I have open an issue: https://issues.jboss.org/browse/ERRAI-559
Its created okay i hope
We use the ErraiBus also for broadcasts, because that JAX-RS would only partial solve this for us.
Regards Michel
-
3. Re: Marshalling / RPC Performance
nva Jun 9, 2013 2:04 PM (in response to werrenmi)1 of 1 people found this helpfulI found that especially large lists suffer from performance degradation. It's simply the nature of the beast: the errai demarshaller process will iterate through the list and then client processing usually includes at least one more iteration, if not more.
As a workaround you can broadcast properly formatted JSON structures as strings on the errai bus and load them into JSO-s on the client side. This speeds up things significantly, especially with complex objects.
-
4. Re: Marshalling / RPC Performance
werrenmi Jun 19, 2013 3:12 PM (in response to nva)Hi Valentin
Sorry for my late answer ... vacation
Thanks for the tip! I will try it.
Regards
Michel
-
5. Re: Marshalling / RPC Performance
werrenmi Jun 21, 2013 1:46 AM (in response to werrenmi)Hello
I have also tried with JAX-RS. With the Errai Marshaller (JAX-RS Maven archetype) it takes 90 - 110 ms. When i activate Jackson on the client and Resteasy on the serverside ~200ms.
Regards
Michel
-
6. Re: Marshalling / RPC Performance
csa Jun 21, 2013 12:53 PM (in response to werrenmi)Hi Michel,
If performance is a concern definitely go with Errai's build in marshaller. Jackson is not supported natively by Errai and involves a transformation step which can only add to the processing time. Have you tried any of these measurements with Errai 3? It would be interesting to see where we are at there. There's also a new 2.4.0.Beta1 release that you can try (it contains all improvements relevant to RPC).
Cheers,
Christian
-
7. Re: Marshalling / RPC Performance
werrenmi Jun 23, 2013 2:13 PM (in response to csa)Hello Christian
Now i have tested it. Both ... 2.4.0.Beta1 and 3.0-SNAPSHOT taskes a longer time (~250ms) with equivalent test data. I see there no really difference between 2.4.0.Beta1 and 3.0-SNAPSHOT.
Tomorrow i will make further tests with custom marshallers and tell you my results again.
Regards
Michel
-
8. Re: Marshalling / RPC Performance
werrenmi Jun 24, 2013 5:19 AM (in response to werrenmi)I tried, but makes no sense, since with custom marshallers is it than a step more in the marshalling process.
Regards
Michel
-
9. Re: Marshalling / RPC Performance
csa Jun 27, 2013 3:28 PM (in response to werrenmi)Hi Michel,
We have investigated this now and cannot reproduce the problem. We have used the exact same class you provided with 100 associations. We get the same performance on 2.2.0, 2.3.2 and 2.4. Actually, on 2.4 it's even slightly faster.
We have enhanced the bus-stress-test-demo to test this on JBoss AS 7.1.1.:
You could try with this demo and see if you still experience slower performance on 2.4. Another thing to check would be the load on the client-side bus. Is your application sending a lot of messages while you're executing this RPC?
Do you see any other notable difference between your app and our demo?
Cheers,
Christian