(workItem.WorkItemLinks[0].LinkTypeEnd.Name.ToString()
Why calling
ToString()
on a member which is already a
string
? This question also holds for other
ToString()
usages in your code.
Size = Convert.ToInt32(workItem.Fields["Effort"].Value)
Convert
class shows really poor performance compared to built-in parsing functions. Always use
Parse
or
TryParse
methods when you want to get an integral value from a string. For example, above snippet could be replaced with
Size = int.Parse(workItem.Fields["Effort"].Value)
Furthermore, if
Value
would already be of type
int
, there would not be any need for parsing at all. Not knowing the definition of your
WorkItemViewModel
class, this is just an assumption.
I am not saying that your code could not benefit from a multithreaded treatment, but if performance is your concern, then better handle basic operations avoiding unnecessary
ToString
calls and usages of
Convert
class.
Just my 2 cents. Hope this helps.