I am looking for some stats on current browsers for how long it takes to render a table using plain HTML versus a hacked-up CSS puritan method that avoids using actual TABLE, TR, TD etc. tags.

我正在寻找当前浏览器的一些统计数据,用于使用纯HTML呈现表所花费的时间,而不是使用实际的TABLE,TR,TD等标记的habr-up CSS清教徒方法。

I am not looking for what's proper, only for what's faster, particularly on Firefox 3, although I am also interested in the stats for other browsers. Of course TABLE tags are designed for tables. That's not the question.

我不是在寻找什么是正确的,只是为了更快,特别是在Firefox 3上,尽管我也对其他浏览器的统计数据感兴趣。当然TABLE标签是为表设计的。那不是问题。

10 个解决方案

#1


8

In general, I would say use <table> for tabular data. However, if the table is very long (say, over 100 rows) and the number of columns is low (~3), using divs to emulate rows would result in a much smaller markup footprint. This is especially relevant if you are using DOM searching javascript (as provided by the many JS libraries), as it would benefit to reduce the DOM tree size.

一般来说,我会说使用

表格数据。但是,如果表非常长(例如,超过100行)并且列数较少(~3),则使用div来模拟行将导致标记占用空间小得多。如果您使用DOM搜索javascript(由许多JS库提供),这尤其重要,因为它将有利于减少DOM树的大小。

This is from experience, I had such a table and was looking for optimizations - moving to a div based display cut the HTML generated to a third and was a big improvement in DOM traversal performance.

这是经验,我有一个这样的表,并正在寻找优化 - 转向基于div的显示将生成的HTML切割为三分之一,并且是DOM遍历性能的重大改进。

更多相关文章

  1. 使用shell从标记中提取多个属性
  2. html5统计数据上报API:SendBeacon
  3. phpstorm取消自动保存并标识修改的文件为星星标记
  4. 纯php文件不加结束标记的好处
  5. JSON解析错误:无法识别的标记'<'处于角度
  6. hibernate(*.hbm.xml)中新添加的字段被标记为红色(找不到)的解决方法
  7. 可以访问Stackoverflow的自动建议标记系统吗?
  8. 使用.after()添加html关闭和打开标记
  9. 如何使用条件if()使用javascript检索带有指定值的选择标记的xml数

随机推荐

  1. Android 主题和样式应用
  2. 学习Android(安卓)--从现在开始
  3. 【Android】Android程序保护与破解浅析
  4. 移动端网络优化
  5. Android开发历程_13(Service的使用)
  6. android之声音管理器AudioManager的使用
  7. android和ios的系统特性区别
  8. Android编译系统-上
  9. 浅谈Android的Rotation动画的应用
  10. Cocos2d-x在win7下的android交叉编译环境