# numDomElements data

**URL:** <https://discuss.httparchive.org/t/numdomelements-data/756>\
**Category:** Uncategorized\
**Created:** [May 24, 2016, 5:53pm UTC](https://discuss.httparchive.org/t/numdomelements-data/756 "2016-05-24T17:53:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![briankardell](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/briankardell/32/641_2.png) [@briankardell](https://discuss.httparchive.org/u/briankardell)\
**Post date:** [May 24, 2016, 5:53pm UTC](https://discuss.httparchive.org/t/numdomelements-data/756/1 "2016-05-24T17:53:15Z")

</div>

Very frequently there are discussions about complexity based on the size of the DOM. A number of features aren’t implemented because of the complexity they would create with large trees - the number of DOM elements on a page. Inevitably this involves discussions on how big trees really are in practice/on average. There are pages like the HTML Living Standard, Single Page edition that has \> 140k elements, but it’s widely accepted that this isn’t the norm - the question for me has always been how can we get decent information on the norms…

I noticed that the HTTP Archive includes some information about the average # DOM elements

[http://mobile.httparchive.org/interesting.php#numDomElements](http://mobile.httparchive.org/interesting.php#numDomElements)

However, this would seem to imply that 3200 is the max # of elements in the DOM tree in the top million sites… are there 0 in this dataset with \>3200? If so, assuming there was one, would it show up as a new bucket with a range, or would it just show up in an “\>3200” bucket?

---

<div class="post-metadata">

**Author:** ![igrigorik](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/igrigorik/32/925_2.png) [@igrigorik](https://discuss.httparchive.org/u/igrigorik)\
**Post date:** [May 25, 2016, 12:03am UTC](https://discuss.httparchive.org/t/numdomelements-data/756/2 "2016-05-25T00:03:28Z")

</div>

As a start, a quick way to enumerate the “heaviest” sites with respect to number of DOM elements:

```sql
SELECT url, numDomElements 
FROM [runs.2016_05_01_pages] 
ORDER BY numDomElements desc
LIMIT 10

```

Results:

```sql
1	http://www.faqexplorer.com/	120086	 
2	http://www.neejolie.fr/	89844	 
3	http://www.groupintown.it/	84249	 
4	http://www.webjars.org/	76956	 
5	http://www.nomadlist.com/	74064	 
6	http://www.xn--4ogoszenia-c0b.pl/	68784	 
7	http://www.sakc.jp/	64500	 
8	http://www.kyujin-ascom.com/	62185	 
9	http://www.mazmize.com/	60091	 
10	http://www.bravelets.com/	58149

```

Restricting to “top 1k” sites:

```sql
SELECT url, numDomElements 
FROM [runs.2016_05_01_pages] 
WHERE rank < 1000
ORDER BY numDomElements desc
LIMIT 10

```

Results:

```sql
Row	url	numDomElements	 
1	http://www.imzog.com/	22482	 
2	http://www.seasonvar.ru/	19007	 
3	http://www.momoshop.com.tw/	12563	 
4	http://www.paytm.in/	11274	 
5	http://www.paytm.com/	10219	 
6	http://www.dianping.com/	9488	 
7	http://www.xcar.com.cn/	8541	 
8	http://www.newegg.com/	8321	 
9	http://www.txxx.com/	8208	 
10	http://www.staples.com/	8123	

```

* * *

Closer to your actual question… Quantiles for element counts:

```sql
SELECT  
  NTH(10, quantiles(numDomElements,101)) tenth,
  NTH(20, quantiles(numDomElements,101)) twentieth,
  NTH(30, quantiles(numDomElements,101)) thirtieth,
  NTH(40, quantiles(numDomElements,101)) fortieth,
  NTH(50, quantiles(numDomElements,101)) fiftieth,
  NTH(60, quantiles(numDomElements,101)) sixtieth,
  NTH(70, quantiles(numDomElements,101)) seventieth,
  NTH(80, quantiles(numDomElements,101)) eightieth,
  NTH(90, quantiles(numDomElements,101)) ninetieth,
  NTH(95, quantiles(numDomElements,101)) ninety_fifth,
  NTH(99, quantiles(numDomElements,101)) ninety_ninth
FROM [httparchive:runs.latest_pages]

```

![](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex035/uploads/httparchive/original/1X/04f06f02f211300c4c09a8721eee103b2ecb27b4.png)

---

<div class="post-metadata">

**Author:** ![steve\_discussha](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@steve\_discussha](https://discuss.httparchive.org/u/steve_discussha)\
**Post date:** [May 25, 2016, 12:49am UTC](https://discuss.httparchive.org/t/numdomelements-data/756/3 "2016-05-25T00:49:07Z")

</div>

And perhaps the initial question is why the histogram stops at 3200. I believe I don’t show any histograms where the percentage is \< 1%. A possible improvement in this situation might be to say “\> 2800” (rather than “2801-3200”).

---

<div class="post-metadata">

**Author:** ![briankardell](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/briankardell/32/641_2.png) [@briankardell](https://discuss.httparchive.org/u/briankardell)\
**Post date:** [May 25, 2016, 1:26am UTC](https://discuss.httparchive.org/t/numdomelements-data/756/4 "2016-05-25T01:26:50Z")

</div>

Yeah, this was effectively my question - looking at the chart it seems to imply that there just aren’t sites bigger than 3200 elements or something, didn’t seem right. I guess I misunderstood, but maybe others would too
