简体   繁体   中英

loading d3.csv of 3.8 MB file fails on some systems

Its about this app: http://mgd-togo.com/crisisNet/SyriaSocialMedia/CrisisNet-Syria.html

On startup I load in a 3.8 MB csv file by calling

d3.csv('data/Data.csv', function (error, personData) { ...

This works on most systems, however on others the browser window crashes. Also, when opened in "Anonymous mode" it tends to work better -> is it a cache/ memory problem?

You are loading those 3.8MB csv(?), then process them multiple times.

3.8MB is not that much data, but processing it actually crashes my browser.

You are sending JSON objects as CSV rows, then go trough all of them. My suggestion is :

1)Use JSON instead of CSV, since you data is mostly JSON already.

2) if you still absolutely need to process the entire dataset (instead of having it already properly formatted from the server), try to implement some lazy loading (multiple requests).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM