I'm currently running into an issue with a project where the time to load the data is taking too long for users. The time it takes to grab the data from the database and send it over to the javascript is fast. The time it takes to process the data on the javascript end is not.
When sending data over, I concat values as such: ("value1|value2|value3||value1|value2|value3..."). Then in the script I split the array based on the deliminator, and I know that the first value is, lets say, the name of the state. Then I know the second value is the number of email opens in that state, etc. I was thinking of doing JSON, but since JSON is based on a key-value system, would that be more data? Since the data I would be sending would be something like: ("stateName{count: value2, stateLongName: value3}").
Is the way JSON parsed faster than concatinating values into a
string, then using JavaScript's 'split()' function to split them up as arrays and looping through them?
Thanks for the help!