I have a server-side service that sends me huge DTOs. I need to put them in a CellTable. It's like 10-200 lines, and i need to see everything at the same time.
I have a server-side log that traces the last "man-made" line of code of my service (just before the return).
Best case scenario, there's a 2 min gap between this log and the table fully loaded. Most of the time, something breaks along the process, and it leaves me hanging.
What are my options ?
Thanks
Edit : I tried the idea of Andrei, differentiating the lenght of the data download (rpc callback) and the lenght of the celltable loading.
I wanted to be sure so here's what i did in my callback :
@Override
public void onSuccess(ResponseBean result) {
Window.alert("success " + new Date().toString());
resultPanel.updateResults(result);
Window.alert("celltable " + new Date().toString());
}
The first alert occurs after ~10sec. But the second one is never called.
This is the method behind updateResults :
public void updateResults(ResponseBean response) {
dataProvider.getList().clear();
dataProvider.getList().addAll(response.beans());
myCellTable.setPageSize(response.beans.size());
}
EDIT 2 : I tried a number of things. The problem occurs when i try to fill the celltable with my data. In Chrome, the chrome version of the BSOD appears. In Firefox, it breaks silently, but the remaining js instructions are not executed. If i try to read the console in firebug, my firefox freezes using ~2.5GB ram. If i use the gwt-runner, it freezes also.
In my example, there are only 4 rows (4 objects with multiple dependancies) !
How can i find WHAT breaks and WHERE ?
Thanks for helping :)
FINALLY : Ok, so i'm apparently a moron. Somewhere in the getValues() there was a piece of "business logic" that should not have been there, and that caused OutOfMemory errors.
The takeways though :
Thanks guys
Normally I would bet my money on the RPC serialization being the bottleneck rather than the CellTable
rendering.
However you are saying that the first alert appears after 10 sec which would speak against that.
Rendering 200 DTO's should be fast enough with a CellTable
.
Also sending 200 DTO's over the wire shouldn't be no problem.
I have used CellTable
and sent around 5000 DTO's over the wire without any performance issue (though I only display 50 at a time and use paging).
A couple of thoughts:
updateResults
function and see how the performance compares.