I am using VSS interop DLLs and .NET to create a new subproject and save
number of xml files in each project.
Basically, the process connects to VSS on same domain. It has to create more
than a 1000 subprojects under the main defined project, and for each it
retrieves the xml file(s) from a database and writes it to a filestream at a
temp location and adds it in VSS.
- The subproject could already be there, so it also checks if the VSSItem
already exists, and then checks all VSSItems to see if it has the filename I am
trying to save.
- If yes, then check out the file to a temp location, check in the new file,
and delete the file from the check out temp location - else, adds a new file
- If yes, then check out the file to a temp location, check in the new file,
- And in the end delete the temp location where the filestream was
saved.
It has to do the above process for like 1000+ items. This whole process is
taking about 15 minutes. The process is async, so it's running in its own
thread.
I am using WPF and WCF here, so I sometimes recieve a SendTimeout which we
can prevent by increasing the timeout in the config file of WPF.
My question is: is VSS processing is so slow always, and how
can we speed it up?
I tried to review the code and couldn't find a way to improve it much. Any
help would be appreciated.