I just finished my most complex and functionally loaded WinForms application . It loads the list into any number of HTML files, then downloads the contents of one, uses some RegEx to match some tags, and removes or replaces them (yes, yes, I saw this. This works fine, thanks to Cthul), and then writes it to disk.
However, I noticed that ~ 200 files take about 30 seconds to process, and after the first 5-10 seconds the program says "Do not respond." I suppose it's not good to do something like this guy , since the hard drive is the bottleneck.
Perhaps it will be possible to load as much as possible into memory, and then process each of them with a stream, write them, and then load a little more into memory?
At the very least, creating a workflow separate from the user interface thread will prevent the Do Not Respond problem? ( This MSDN article covers what I was considering. )
Iβm probably asking if multithreading will offer any speed improvements, and if so, what would be the best way to do this?
Any help or advice is greatly appreciated!
source
share