CPU usage and performance

Jan 18, 2012 at 5:10 AM

Hi All,

I am profiling my ASP.NET MVC app and when I hit my local version on IIS and I have noticed that deserializing an object of about 77kb takes around 100ms, is this expected?

Also the CPU seems to max out while im profiling, is the task of deserializing very intense, or should I be looking elsewhere?

Cheers,

Mark

Jan 18, 2012 at 11:37 PM

As an FYI I have cross posted this topic to SO for more visibility.

http://stackoverflow.com/questions/8919592/json-net-performance-over-a-77kb-json-string

Coordinator
Jan 19, 2012 at 1:35 AM
Edited Jan 19, 2012 at 1:38 AM

100ms is longer than I would have expected.

In the past week I've checked in various performance improvements. Try getting the latest source code here and use that dll (remember to build using the release configuration). If that doesn't offer any improvement then create a bug on CodePlex with the JSON and the class you're deserializing to and I'll take a look.

Jan 24, 2012 at 8:53 AM

I wrote a little sample app that gets a string into memory (~70kb) then deserializes it over and over with a stopwatch object timing each one.

It seems that the very first hit is an order of mangitude slower than every single remaining deserialization calls, the first one is around 150ms, then each other is around the 15 - 20ms, which is what I would have expected in the first place. Is there some static initialization calls that occur?

I have not yet checked out the latest build to test it, I will though...

Coordinator
Jan 24, 2012 at 10:28 AM

Yes