Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Questions about speeding up web services

Options
  • 13-01-2011 9:19am
    #1
    Closed Accounts Posts: 5,284 ✭✭✭


    In WCF, are empty collections serialized?

    Is it faster to have call multiple web services on different threads at the same time, or to call one service which would return an object composed of the same results?


Comments

  • Closed Accounts Posts: 5,284 ✭✭✭pwd


    Adding (IsRequired = false) to the DataMember tag means you can leave empty collections (or any other properties) as null, so presumably they won't be serialized. (Not tested, but I'm missing the point completely if this isn't what happens).

    By replacing linq2sql with datareaders/stored procedures, and minimising database calls (and some other stuff) I have improved these web service methods from "unusably slow" to "really fast", which is at least a 95% reduction in load time from a local server... Did you know that foreach loops are much slower than for loops? I did not.

    Has anybody used Google Protocol Buffers with .net, by any chance?


  • Registered Users Posts: 11,980 ✭✭✭✭Giblet


    Are you using caching also? If you are reusing stored procedures, you can cache the result and generate a key from the parameters.


Advertisement