Curl Global Community

Full Version: JsonValue versus JsonObject
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It is my experience now that where performance is concerned, it is important to move as quickly as possible from a collection of JsonValue to a collection of JsonObject.

What you escape in that way is both any-casts and any-calls.

If I have an array of JsonValue, I iterate over it with asa JsonObject within


{with-compiler-directives allow-implicit-any-casts? = true do
}


to create a collection of type JsonObject.

The difference in performance has been dramatic: 10 seconds for several hundred records versus 1+ second - so about an order of magnitude improvement.

I am only using JSON because I have made some files available in that format.

My next efforts will be with using Curl value classes for multiple name-value associations of type String.

UPDATE: a comparison of the JSON to the Curl data is posted at http://lcurlr.blogspot.ca/2012/05/curl-versus-json.html