When To Use Pagination in REST Resources” and advocated for better UX Design instead of pagination. This generated another question: “Just how big is TOO BIG for JSON? In the context of a desktop browser, there are many factors to answer this question that include file, memory and object size as well as transport and loading time. I wanted find the “sweet spot” for speaking to the maximum usable size of a JSON object. So I decided to test desktop browsers to see how they handle JSON at different sizes. At some point, I would also like to see how this translates to mobile devices. The JSON samples were pulled from customer data in sizes ranging from 1 record to 1,000,000 records. Each record averages around 200 bytes a piece. The core HTML file only loads the JSON file and sets it to the testData variable. The following is an example JSON object used in this test:
1
2
3
4
5
6
7
8
9
10
|
var testData = [
{
"ACCTOUNT_NUMBER":"1234567890",
"CUSTOMER_NAME":"ACME Products and Services, Inc.",
"ADDRESS":"123 Main Street",
"CITY":"Albuquerque",
"STATE":"NM",
"ZIP":"87101-1234"
}
]
|
Records | Download Time* | Chrome (OS X) | Firefox (OS X) | Safari (OS X) | IE9 (Win 7) |
---|---|---|---|---|---|
1,000,000 (153.37MB) | 19:51 | DOM Ready:16.4s RAM: 1.09GB Loading:browser hang Loaded:usable, 1 tab crash | DOM Ready:14.29s RAM: 1.82GB Loading:untestable Loaded:usable | DOM Ready:5.13s RAM: 1.76GB Loading:browser hang Loaded: usable | Data failed to load and browser became unresponsive. |
750,000 (115.13MB) | 14:54 | DOM Ready:12.24s RAM: 727.3MB Loading:browser hang Loaded:usable | DOM Ready:13.8s RAM: 1.48GB Loading:browser hang Loaded:usable | DOM Ready:3.82s RAM: 1.39GB Loading: barely usable Loaded: usable | Data failed to load and browser became unresponsive. |
500,000 (76.69MB) | 9:56 | DOM Ready:9.13s RAM: 512.0MB Loading:browser hang Loaded:usable | DOM Ready:12.19s RAM: 1.14G Loading:browser hang Loaded:usable | DOM Ready:2.49s RAM: 1.02GB Loading: usable Loaded: usable | Data failed to load and browser became unresponsive. |
250,000 (38.44MB) | 4:58 | DOM Ready:2.98s RAM: 289.8MB Loading:barely usable Loaded:usable | DOM Ready:3.09s RAM: 659.3MB Loading:barely usable Loaded:usable | DOM Ready:1.57s RAM: 550.0MB Loading: usable Loaded: usable | DOM Ready:4.88s RAM: 537.1MB Loading:browser hang Loaded: usable |
100,000 (15.5MB) | 2:00 | DOM Ready:1.24s RAM: 150.4MB Loading:usable Loaded:usable | DOM Ready:1.62s RAM: 424.0MB Loading:usable Loaded:usable | DOM Ready:463ms RAM: 296.2MB Loading:untestable Loaded: usable | DOM Ready:1.71s RAM: 210.6MB Loading:untestable Loaded: usable |
50,000 (7.77MB) | 1:00 | DOM Ready:521ms RAM: 89.7MB Loading:untestable Loaded:usable | DOM Ready:1.08s RAM: 308.9MB Loading:untestable Loaded:usable | DOM Ready:243ms RAM: 192.8MB Loading:untestable Loaded: usable | DOM Ready:801ms RAM: 110.1MB Loading:untestable Loaded: usable |
25,000 (3.87MB) | 00:30 | DOM Ready:255ms RAM: 67.5MB Loading:untestable Loaded:usable | DOM Ready:646ms RAM: 269.3MB Loading:untestable Loaded:usable | DOM Ready:169ms RAM: 130.8MB Loading:untestable Loaded: usable | DOM Ready:408ms RAM: 51.1MB Loading:untestable Loaded: usable |
10,000 (1.55MB) | 0:12 | DOM Ready:144ms RAM: 53.1MB Loading:untestable Loaded:usable | DOM Ready:193ms RAM: 234.7MB Loading:untestable Loaded:usable | DOM Ready:66ms RAM: 105.1MB Loading:untestable Loaded: usable | DOM Ready:117ms RAM: 35.1MB Loading:untestable Loaded: usable |
5,000 (796.57KB) | 0:06 | DOM Ready:81ms RAM: 39.14MB Loading:untestable Loaded:usable | DOM Ready:123ms RAM: 220.9MB Loading:untestable Loaded:usable | DOM Ready:42ms RAM: 77.2 Loading:untestable Loaded: usable | DOM Ready:151ms RAM: 18.2MB Loading:untestable Loaded: usable |
1,000 (159.59KB) | 0:01 | 68ms RAM: 29.1MB Loading:untestable Loaded:usable | 76ms RAM: 209.2MB Loading:untestable Loaded:usable | 41ms RAM: 72.0 Loading:untestable Loaded: usable | 63ms RAM: 11.3MB Loading:untestable Loaded: usable |
500 (80.01KB) | 0:00 | DOM Ready:61ms RAM: 32.5MB Loading:untestable Loaded:usable | DOM Ready:59ms RAM: 209.2MB Loading:untestable Loaded:usable | DOM Ready:32ms RAM: 71.6MB Loading:untestable Loaded: usable | DOM Ready:54ms RAM: 8.6MB Loading:untestable Loaded: usable |
250 (40.05KB) | 0:00 | DOM Ready:55ms RAM: 28.7MB Loading:untestable Loaded:usable | DOM Ready:53ms RAM: 209.1MB Loading:untestable Loaded:usable | DOM Ready:33ms RAM: 71.4MB Loading:untestable Loaded: usable | DOM Ready:62ms RAM: 7.1MB Loading:untestable Loaded: usable |
100 (15.97KB) | 0:00 | DOM Ready:53ms RAM: 28.8MB Loading:untestable Loaded:usable | DOM Ready:66ms RAM: 209.1MB Loading:untestable Loaded:usable | DOM Ready:33ms RAM: 70.1MB Loading:untestable Loaded: usable | DOM Ready:39ms RAM: 6.6MB Loading:untestable Loaded: usable |
50 (8.05KB) | 0:00 | DOM Ready:40ms RAM: 27.9MB Loading:untestable Loaded:usable | DOM Ready:68ms RAM: 209.1MB Loading:untestable Loaded:usable | DOM Ready:36ms RAM: 71.1MB Loading:untestable Loaded: usable | DOM Ready:35ms RAM: 5.7MB Loading:untestable Loaded: usable |
25 (4.07KB) | 0:00 | DOM Ready:12ms RAM: 28.6MB Loading:untestable Loaded:usable | DOM Ready:77ms RAM: 209.1MB Loading:untestable Loaded:usable | DOM Ready:29ms RAM: 71MB During Load: untestable Loaded: usable | DOM Ready:29ms RAM: 3.5MB Loading:untestable Loaded: usable |
1 (192B) | 0:00 | DOM Ready:7ms RAM: 28.2MB Loading:untestable Loaded:usable | DOM Ready:59ms RAM: 207MB Loading:untestable Loaded:usable | DOM Ready:35ms RAM: 64.0MB Loading:untestable Loaded: usable | DOM Ready:19ms RAM: 3.1MB Loading:untestable Loaded: usable |