Page 1 of 1

Anyone notice JSON is really slow?

Posted: 16 Jan 2011, 05:06
by tommy408
The following test took 62ms in Java. In a game with a lot of concurrent users requesting small piece of data, this is really bad. I don't know any data structure that is has even 1ms for these operations.

net.sf.json.JSONArray array = new net.sf.json.JSONArray();

Util.timeStart();
array.add(name);
array.add(userID);
array.add(status);
Util.timeStop();


EDIT:

Use org.json.JSONArray instead.