Just having them open should not cause much of an issue. The buffer might cause memory issues, so you might want to use a cosntructor that overrides it's size and keep in mind to regulary call .flush() after being finished with the current write operation.
The biggest issues with Filestream are usually:
Properly closing/disposing of them in Exception case so the programm is not blocking itself access to files if it catches an exception after loosing the references to the Filestream instance.
Paralell IO Operations usually do not increase performance. Indeed they are very likely to decrease it, because they keep getting in each others way. The biggest limit for all IO Operations is usually the IO Part, Paralellism will mostly improve CPU usage.
Leaving anything Disposeable open for a long time can make it difficulty to properly dispose of them in exception case. This is especially true if they are accessed across multiple Functions. I try to avoid such a design as much as possible.
Let's talk about MVVM: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/b1a8bf14-4acd-4d77-9df8-bdb95b02dbe2 Please mark post as helpfull and answers respectively.
No comments:
Post a Comment