Efficient Method for Creating CSV String from Lists/SortedLists C#?

后端 未结 3 426
伪装坚强ぢ
伪装坚强ぢ 2021-01-27 13:54

I have an application which implements Asynchronous SOAP. Every 50-100ms I will receive data which is converted into a SortedList object. I als

3条回答
  •  深忆病人
    2021-01-27 14:45

    Here are some thoughts.

    1) Use a StreamWriter to write instead of File. This will be faster than the two step of writing to memory and then to a file.

    2) If it all possible parallelize the work. For example if you can you one thread for processing the message and another thread to write the message.

    3) I don't think the intent of LINQ is to improve performance, but make manipulations of data easier

提交回复
热议问题