Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Since you are having CPU issues, I suspect deserialization is the main culprit. In that case, you can make serialization, deserialization nearly 100 times faster by implementing <code>ISerializable</code> interface yourself. I have used this technique before for large object graph and the improvement was phenomenal. </p> <p>Say you have a class like this:</p> <pre><code>[Serializable] public class TestObject : ISerializable { public long id1; public long id2; public long id3; public string s1; public string s2; public string s3; public string s4; public DateTime dt1; public DateTime dt2; public bool b1; public bool b2; public bool b3; public byte e1; public IDictionary&lt;string,object&gt; d1; } </code></pre> <p>Implement ISerializable so that you can do custom serialization and deserialization.</p> <pre><code>public void GetObjectData (SerializationInfo info, StreamingContext ctxt) { SerializationWriter sw = SerializationWriter.GetWriter (); sw.Write (id1); sw.Write (id2); sw.Write (id3); sw.Write (s1); sw.Write (s2); sw.Write (s3); sw.Write (s4); sw.Write (dt1); sw.Write (dt2); sw.Write (b1); sw.Write (b2); sw.Write (b3); sw.Write (e1); sw.Write&lt;string,object&gt; (d1); sw.AddToInfo (info); } public TestObject (SerializationInfo info, StreamingContext ctxt) { SerializationReader sr = SerializationReader.GetReader (info); id1 = sr.ReadInt64 (); id2 = sr.ReadInt64 (); id3 = sr.ReadInt64 (); s1 = sr.ReadString (); s2 = sr.ReadString (); s3 = sr.ReadString (); s4 = sr.ReadString (); dt1 = sr.ReadDateTime (); dt2 = sr.ReadDateTime (); b1 = sr.ReadBoolean (); b2 = sr.ReadBoolean (); b3 = sr.ReadBoolean (); e1 = sr.ReadByte (); d1 = sr.ReadDictionary&lt;string,object&gt; (); } </code></pre> <p>This will not only make the payload 10-100 times smaller, but also improve the performance by 10x to sometimes 100x. </p> <p>Another thing, see if you have any large loop that loops through thousands of objects. Maybe you have suboptimal linq queries. Those are sometimes CPU hog.</p> <p>And finally I would recommend Top 10 caching mistakes that I have seen developers make, especially when using a distributed cache. </p> <p><a href="http://www.codeproject.com/Articles/115107/Ten-Caching-Mistakes-that-Break-your-App" rel="nofollow">http://www.codeproject.com/Articles/115107/Ten-Caching-Mistakes-that-Break-your-App</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload