Performance SmartGWT listgrid在滚动时非常慢

Performance SmartGWT listgrid在滚动时非常慢,performance,smartgwt,listgrid,Performance,Smartgwt,Listgrid,我正在编写一个非常简单的SmartGWT应用程序,它在本地用100个元素填充listgrid,而不涉及RPC或任何服务器交互 当我滚动listgrid时,滚动速度明显较慢 环境: SmartGWT 3.0 GWT 2.4.0 代码如下: public class RemoteFileBrowser implements EntryPoint { // /** // * The message displayed to the user when the server cannot be rea

我正在编写一个非常简单的SmartGWT应用程序,它在本地用100个元素填充listgrid,而不涉及RPC或任何服务器交互

当我滚动listgrid时,滚动速度明显较慢

环境: SmartGWT 3.0 GWT 2.4.0

代码如下:

public class RemoteFileBrowser implements EntryPoint {

// /**
// * The message displayed to the user when the server cannot be reached or
// * returns an error.
// */
// private static final String SERVER_ERROR = "An error occurred while "
// + "attempting to contact the server. Please check your network "
// + "connection and try again.";
//
// /**
// * Create a remote service proxy to talk to the server-side Greeting
// service.
// */
// private final RemoteFileServiceAsync greetingService = GWT
// .create(RemoteFileService.class);

/**
 * This is the entry point method.
 */
public void onModuleLoad() {
////            SC.say("Welcome to remote file browser!");
//      RemoteFileDialog rfDialog = new RemoteFileDialog("*.*, *.htm, *.cpp, *.hpp");
//      rfDialog.show();
        getListView().draw();

    }

    private ListGrid getListView() {

        ListGrid grid = new ListGrid();
        grid.setWidth(500);
        grid.setHeight(400);
        grid.setLeft(100);
        grid.setTop(100);

        ListGridField field1 = new ListGridField("name");
        ListGridField field2 = new ListGridField("designation");
        grid.setFields(field1, field2);

        ListGridRecord[] records = new ListGridRecord[100];
        for (int i=0; i<100; ++i) {
            //ListGridRecord record = new ListGridRecord();
            records[i] = new ListGridRecord();
            GWT.log("Iteraton:" + i);
            records[i].setAttribute("name", "name" + i);
            records[i].setAttribute("designation", "designation" + i);
        }
        grid.setData(records);
        return grid;
    }

}
展示的例子似乎效果不错。当我在本地填充列表网格而不设置数据源时,就会出现问题

你知道我哪里弄错了吗

提前感谢您的帮助

问候,,
RV

您正在使用哪个浏览器?我用最新的Chrome进行了测试,尽管我用SmartGwt 2.5版本编译了您的代码,而且我有一个非常流畅的滚动体验!你好,gpapaz,我正在Ubuntu 11.10-64位上使用Firefox 7.0.1。我可以在运行ubuntu和firefox 7.0.1的2台PC上重现这个问题。我将尝试使用SmartGWT2.5并查看其行为。使用SmartGWT2.5进行了尝试,但行为相同。更准确地说,我使用鼠标滚轮在显示的网格上滚动。如果我向下[或向上]滚动2或3次,用新的滚动项目更新视图实际上需要3秒钟。如果我交替地上下滚动,它几乎像挂起一样被搞砸了。经过一些研究和开发,我发现添加下面的行可以极大地改进它,尽管仍然不是很完美。fileGrid.setShowAllRecordstrue;你能用Chrome浏览器测试一下吗。我想排除JS引擎速度慢的可能性。setShowAllRecords呈现所有记录,从而减少滚动时显示新单元格的时间。如果您的ListGrid有很多记录,这将是一个糟糕的选择。