我们正在使用农业网格版本'17 .1.0'。
我们已经观察到指标,在Firefox中渲染网格所花的时间比chrome所花的时间要多。
Chrome浏览器:“ BalancedColumnTreeBuilder:2064ms”
Firefox:'BalancedColumnTreeBuilder:10766ms'
BalancedColumnTreeBuilder.prototype.createBalancedColumnGroups = function (abstractColDefs, primaryColumns) {
console.time('BalancedColumnTreeBuilder');
// column key creator dishes out unique column id's in a deterministic way,
// so if we have two grids (that cold be master/slave) with same column definitions,
// then this ensures the two grids use identical id's.
var columnKeyCreator = new columnKeyCreator_1.ColumnKeyCreator();
// create am unbalanced tree that maps the provided definitions
var unbalancedTree = this.recursivelyCreateColumns(abstractColDefs, 0, columnKeyCreator, primaryColumns);
var treeDept = this.findMaxDept(unbalancedTree, 0);
this.logger.log('Number of levels for grouped columns is ' + treeDept);
var balancedTree = this.balanceColumnTree(unbalancedTree, 0, treeDept, columnKeyCreator);
this.columnUtils.depthFirstOriginalTreeSearch(balancedTree, function (child) {
if (child instanceof originalColumnGroup_1.OriginalColumnGroup) {
child.setupExpandable();
}
});
console.timeEnd('BalancedColumnTreeBuilder');
return {
balancedTree: balancedTree,
treeDept: treeDept
};
};
chrome和firefox的BalancedColumnTreeBuilder代码执行时间之间存在巨大差异。