Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
JsonValue versus JsonObject
05-28-2012, 08:19 AM, (This post was last modified: 05-28-2012, 08:14 PM by RobertShiplett.)
#1
JsonValue versus JsonObject
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


Robert Shiplett, Curlr
Fredericton NB

Canada
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  {do } versus plain code expression RobertShiplett 0 2,296 05-31-2012, 11:07 PM
Last Post: RobertShiplett
Forum Jump:


Users browsing this thread:
1 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('505')