[ 
https://issues.apache.org/jira/browse/SHINDIG-451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614302#action_12614302
 ] 

Ian Boston commented on SHINDIG-451:
------------------------------------

Update on the comparative tests, below,
Some observations. 
1. Its not that easy to get reliable memory stats, so these might be wrong.
2. The SF JSON library is serializing all properties (as per the output) 
whereas the original implementation was serializing only the properties that 
have been set.
3. SF JSON takes 60% of the time and about 75% the memory overhead per pojo -> 
json string conversion wrt the ORG JSON version, however the output is about 
10x the size due to sending empty values.
4. I still don't have comparative results on input, but input on SF JSON is 
more expensive than output.

BTW, I am seeing error bars of about +-10% on most of these figures.

INFO SF JSON Lib Output 0.436 ms/conversion, 188.96313 heap bytes/conversion, 
output packet consumed on average 2133.057 for a string length of 1043  
[2008-07-17 12:43:17,878] (JsonConverterPerformanceTest.java:142) 
INFO Output Was 
[{"addresses":[],"sexualOrientation":null,"happiestWhen":null,"ethnicity":null,"books":[],"profileVideo":null,"profileUrl":null,"turnOffs":[],"id":"0","scaredOf":null,"humor":null,"bodyType":null,"lookingFor":null,"turnOns":[],"music":[],"urls":[],"tags":[],"heroes":[],"gender":null,"nickname":null,"drinker":null,"religion":null,"newfield":"nonsense","pets":null,"interests":[],"isOwner":false,"relationshipStatus":null,"movies":[],"networkPresence":null,"currentLocation":null,"dateOfBirth":null,"schools":[],"smoker":null,"romance":null,"food":[],"profileSong":null,"updated":null,"age":0,"sports":[],"cars":[],"phoneNumbers":[],"activities":[],"aboutMe":null,"politicalViews":null,"name":{"honorificPrefix":null,"honorificSuffix":null,"unstructured":"robot","additionalName":null,"givenName":null,"familyName":null},"tvShows":[],"fashion":null,"timeZone":0,"thumbnailUrl":null,"emails":[],"livingArrangement":null,"jobs":[],"status":null,"jobInterests":null,"isViewer":false,"hasApp":false,"languagesSpoken":[],"quotes":[],"children":null}]
  [2008-07-17 12:43:17,901] (JsonConverterPerformanceTest.java:148) 
INFO SF JSON Lib Input 1.262 ms/conversion, 1929.5159 heap bytes/conversion, 
person object consumed on average 322.1496  [2008-07-17 12:43:34,538] 
(JsonConverterPerformanceTest.java:179) 
INFO ORG JSON Lib Output 0.5459 ms/conversion, 252.1544 heap bytes/conversion, 
output packet consumed on average 237.5096 for a string length of 97  
[2008-07-17 12:43:40,211] (JsonConverterPerformanceTest.java:213) 
INFO Output Was 
[{"newfield":"nonsense","name":{"unstructured":"robot"},"id":"0","isOwner":false,"isViewer":false}]
  [2008-07-17 12:43:40,216] (JsonConverterPerformanceTest.java:219) 





> JSON Serialization using net.sf.json-lib
> ----------------------------------------
>
>                 Key: SHINDIG-451
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-451
>             Project: Shindig
>          Issue Type: Improvement
>          Components: OpenSocial  feature (Javascript), RESTful API (Java)
>            Reporter: Ian Boston
>         Attachments: SHINDIG-451.patch
>
>
> Progress on a patch to use json-lib to perform serialization of the inbound 
> and outbound json messages, at the moment it re-uses the rhino from Shindig 
> 412, but only in the tests to give finer grain control in the test cases. The 
> Enum handling in json-lib is neat :).
> The unit tests that are not currently working are disabled with a Xtest, but 
> Person and activity with some depth in the tree are working.
> Will attache the patch in a moment.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to