Hi,
I am using JSON.parse to load meshes and textures from a webserver. I thought that JSON.parse() would actually invoke a browser native code variant? Thus I expected it to be fast.
My Benchmark looks like this:
[INFO]: Loading! // starting to query resource from local server, a (too detailed) BlackHawk helicopter
[INFO]: [0 ms]: Parsing JSON... // here only JSON.parse() is called on a 2 megabyte JSON string
[INFO]: [1443 ms]: Importing JSON... // creating useful objects and assigning the parts of the parsed JSON data... This is blazingly fast to my suprise!
[INFO]: [1450 ms]: Done! // Yeah, mesh loaded!
[INFO]: Success!
This runs on Dartium, in the VM, without debug/checked-mode. So this should be the fastest setting.
Is there a chance that this runs MUCH faster in a real browser (I am talking about least one order of magnitudes)? Because otherwise this would suck. Currently I can't test it, since Dart2Js is broken on my sources, since it obviously can't handle static functions as default parameter value...
This JSON string is parsed in NO time, by a C++ JSON parser, and I would expect browser to be similarily fast, at least not 1000 times slower...