Tuesday, August 31, 2010

Speed-Optimization of an application (RPCs, Architecture)

Hi all,

first of all i am sorry if my english is not always correct, but i'll
do my best.

I'm pretty new to the GWT and just finished writing my first
application and i have a few questions. I couldn't find answers to
them in this group, the GWT docs or with the help of google. If there
are already existing topics i would be thankful for some links.

First a short description of my app:
The UI consists basically of a tabpanel. If there's a change in the
app required, which means new data from server is needed i.e. due to a
new history item typed in the adress bar, each tab of the tabpanel
gets the data from the server with a RPC.
Assume an app which shows a soccer player: The first tab shows his
picture, the second his characteristics like size, weight, etc., the
third tab shows his club history and so on.
The first tab is the one, that i want to be loaded as fast as
possible, because this is what i want to show immediately (while first
tab is loading, i'll show a loading screen). The data of the other
tabs can be loaded afterwards (without loading screen). What's the
best way to do that? At the moment, i have 8 tabs and i call first the
RPC for tab1, then RPC for tab2 etc.
S.th. like that:

loadPlayer(String inputPlayer){
rpc_loadImage(inputPlayer); // <-- this is what i want to have
high priority

1.) But because RPCs are of course asynchronous, it happens that RPC
for tab2 returns before the RPC for tab1. I know i could start the
other RPCs after receiving the first one, but is this the right way to
do it?

2.) Another thing: Is it in general good to have more or less RPCs
which are called at a time (i could merge a few if it would help)?

Hope someone can help me!

Thanks in advance,

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment