问题描述
我是一个有问题的开发人员;)目前我们的项目已接近尾声(使用Vaadin)但是......
I'm a developer with a problem ;) Currently we're close to an end on our project (using Vaadin) however...
我们是在我们的一个视图中显示简单数据会遇到麻烦。 (显示超过500 KB的数据,以及Vaadin完成生成后超过15K DOM元素... +批次,批次和批次完成之前的很多秒)。
we're getting some trouble with displaying simple data in one of our views. (over 500 KB of data to display, and over 15K DOM elements after Vaadin is done with generating it... + lots, and lots and LOTS seconds before it's done).
我的任务是找出如何让它尽可能小和尽快,所以我的第一个猜测是使用一些其他布局,而不是那些在标准Vaadin中可用的布局。
My task is to find out how i can make this as small and as fast as possible, so my first guess was to use some other layouts than those avaliable in standar Vaadin.
我使用了WeeLayout,DashLayout和CssLayout(默认),比较如下:
I used WeeLayout, DashLayout and CssLayout(default), compare is below:
weeLayout
- page size: 990 KB
- DOM elements (SMALL): 1454
- DOM elements (BIG): 15423
cssLayout
- page size: 886 KB
- DOM elements (SMALL): 1434
- DOM elements (BIG): 13799
DashLayout
- page size: 938 KB
- DOM elements (SMALL): 1408
- DOM elements (BIG): 12163
它没有工作。所以我的另一个猜测是编写我自己的布局,有人可以帮我这个吗?我甚至不知道应该从什么开始。
It didn't work. So my other guess is to write my own Layout, can someone help me with this ? I even don't know from what should i start.
谢谢
Lukasz
ThanksLukasz
推荐答案
所以答案为这是在CustomLayout中使用HTML。
So the answer for this is using HTML in CustomLayout.
这篇关于使用Vaadin生成慢速HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!