GWT: Populating a page from datastore using RPC is too slow

Posted by Ilya Boyandin on Stack Overflow See other posts from Stack Overflow or by Ilya Boyandin
Published on 2010-05-02T16:02:31Z Indexed on 2010/05/02 16:08 UTC
Read the original article Hit count: 243

Filed under:
|
|
|
|

Is there a way to speed up the population of a page with GWT's UI elements which are generated from data loaded from the datastore? Can I avoid making the unnecessary RPC call when the page is loaded?

More details about the problem I am experiencing: There is a page on which I generate a table with names and buttons for a list of entities loaded from the datastore. There is an EntryPoint for the page and in its onModuleLoad() I do something like this:

final FlexTable table = new FlexTable();

rpcAsyncService.getAllCandidates(new AsyncCallback<List<Candidate>>() {
    public void onSuccess(List<Candidate> candidates) {
       int row = 0;
       for (Candidate person : candidates) {
          table.setText(row, 0, person.getName());
          table.setWidget(row, 1, new ToggleButton("Yes"));
          table.setWidget(row, 2, new ToggleButton("No"));
          row++;
       }
    }
    ...
});

This works, but takes more than 30 seconds to load the page with buttons for 300 candidates. This is unacceptable.

The app is running on Google App Engine and using the app engine's datastore.

© Stack Overflow or respective owner

Related posts about gwt

Related posts about gwt-rpc