本文介绍了如何使Qooxdoo虚拟列表可扩展?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我需要显示数据列表,至少有100万行(大数据,机器学习)。 我不需要立即显示,qooxdoo表的remotetablemodel工作正常,而不是表我选择列表作为设计选择。I need to show list of data , at least 1 million rows (Big data , machine learning).I do not need to show at once , remotetablemodel of qooxdoo table works fine but instead of table i choose list as design choice.下面是测试我已经制作。Below is a test i've made.//create the model data, 1mil itemsvar rawData = [];for (var i = 0; i < 1000000; i++) { rawData[i] = "Item No " + i;}var model = new qx.data.Array(rawData);//create the listvar list = new qx.ui.list.List(model);this.getRoot().add(list);我理解生成rawdata并将其分配给列表需要很长时间。 但问题是在分配列表后,虚拟列表本身几乎没有响应。I understand the point that it will take long to generate rawdata and assign it to list.But the problem is after assigning the list , the virtual list itself is almost non-responsive.滚动非常慢,按向下箭头导航会冻结一些也是秒。 如果我理解正确,Qooxdoo虚拟基础架构假设只呈现可见项目?但在上面的测试案例中,它是如此之慢。 我希望像远程桌面模型一样工作。Scrolling is very slow , navigating by down arrow freezes a few secs too.Qooxdoo virtual infrastructure is suppose to render only visible items if i understand correctly? But in above test case it is so slow.I expect to work like remote table model .使用qooxdoo最新4.0.0和3.5.1测试,在Chrome 35稳定版上。Tested with qooxdoo latest 4.0.0 and 3.5.1 , on Chrome 35 stable.推荐答案我只能使用源版本而不是构建版本重现您的问题。我找到了性能如此缓慢的原因。在SingleValueBinding的内部方法中有一个运行时检查,它对渲染有很大的性能影响。I can reproduce you issue only with the source version and not with the build version. I found the reason why the performance is so slow. There is an runtime check in an internal method from the SingleValueBinding which has a huge performance impact on the rendering.我为此打开了一个错误报告: http://bugzilla.qooxdoo.org/show_bug.cgi?id=8439I opened a bug report for that:http://bugzilla.qooxdoo.org/show_bug.cgi?id=8439但令人遗憾的是,这个问题只发生在你的开发者版本中。因此,您的客户不受影响。But as I sad this issue only occurs with your developer version. So your customers are not effected.如果需要,您可以禁用支票。只需删除检查块: https://github.com/qooxdoo/qooxdoo/blob/master/framework/source/class/qx/data/SingleValueBinding.js#L915You can disable the check if you want. Just remove the check block:https://github.com/qooxdoo/qooxdoo/blob/master/framework/source/class/qx/data/SingleValueBinding.js#L915您还可以将模型数据加载到零件中以改进模型创建。当用户滚动到列表末尾时,您可以加载下一部分。您可以使用您已经看过的示例: qooxdoo中的无限滚动虚拟列表You can also load your model data in parts to improve the model creation. You can maybe load the next part when the user has scrolled to the end of the list. You can use the example you have already seen:Infinite scroll in qooxdoo with virtual list 这篇关于如何使Qooxdoo虚拟列表可扩展?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-04 04:51
查看更多