You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2019/12/03 05:16:29 UTC

[GitHub] [openwhisk-runtime-dotnet] kamyker commented on issue #26: Raw requests to skip JObject conversion

kamyker commented on issue #26: Raw requests to skip JObject conversion
URL: https://github.com/apache/openwhisk-runtime-dotnet/issues/26#issuecomment-561002640
 
 
   @shawnallen85 some files used, SpeedTest1.cs has all functions:
   It wasn't good idea to upload 1mb json to gist so zip download may be better: 
   [gist](https://gist.github.com/kamyker/e139bb36e9984be5eb58d515095f3c6f) or [zip](https://gist.github.com/kamyker/e139bb36e9984be5eb58d515095f3c6f/archive/b0583e8712d72caab2528bcc77cb8c44a6ca588e.zip)
   
   Tried BenchmarkNet instead of using Stopwatch and current implementation is the slowest and what's more important in will also slowdown any json usage as user will have to either use slow JObject to navigate or convert JObject to custom object (double conversion):
   ```
   |                   Method |      Mean |     Error |    StdDev | Ratio |     Gen 0 |     Gen 1 |    Gen 2 | Allocated |
   |------------------------- |----------:|----------:|----------:|------:|----------:|----------:|---------:|----------:|
   |          TestJObjectLoad |  9.676 ms | 0.0522 ms | 0.0489 ms |  1.00 | 1375.0000 |  781.2500 | 390.6250 |   9.65 MB |
   |         TestJObjectParse | 13.806 ms | 0.0793 ms | 0.0741 ms |  1.43 | 1687.5000 | 1203.1250 | 546.8750 |  11.54 MB |
   |     TestDictionaryObject | 10.356 ms | 0.0482 ms | 0.0427 ms |  1.07 | 1656.2500 |  984.3750 | 656.2500 |  10.78 MB |
   | TestManualToCustomObject |  6.309 ms | 0.0411 ms | 0.0384 ms |  0.65 |  726.5625 |  687.5000 | 500.0000 |   3.72 MB |
   ```
   ~500kb json on i9 9900k, 6ms faster is not much but 7-8mb less memory looks good
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services