Installing Software with 50,000 Images

by Codewiz51 April 29, 2009 18:57

This has been a very interesting project. My boss designed a nifty product which has been well received. My involvement has strictly been with the installation. I have been forced to discover a lot about Windows and DVD file systems while figuring out how to get 50,000 images on to a hard drive in a reasonable amount of time.

I first attempted to do everything through an MSI package. I know a lot about the Windows Installer API, and I did not give the project much thought (in the beginning). I also discovered that using an MSI package would take something on the order of 3+ hours on a very fast machine to complete the installation. This was clearly going to be a lot more work than I anticipated.

I then came up with the idea of using SHFileOperation. I've used a class written by Michael Dunn (CShellFileOp), adapted for use with ATL for such purposes in the past, but never with so many files. I had long since given up on using an MSI, and I had resigned myself to using a fancy copy routine. I was able to shorten the copy time to two and a half hours. While working with this code, I found that creating a large number of directories (~7,000) is a time consuming process. I observed that the dialog displayed by the Shell lengthens the copy time by about 30%.

Ultimately, I happened by chance across this article by Vinnichenko Alexey:"Copy, Move and Delete files and directories without using SHFileOperation". I was able to work with this code, removing an MFC dependency and adding my own ATL code to copy the image files rapidly. (Rapidly may be a misnomer.) My final product still takes approximately one hour to install on a local hard drive.

I also learned a lot about DVD file systems. I use MyDVD by Roxio to burn the DVDs. This software defaults to a Joliet file system, limited to 106 character file name lengths. After spending several days debugging code that didn't need debugging, I discovered I needed to switch to ISO Level 2 format, which supports ~226 characters. I've never really paid much attention to DVD file formats. (Have you?)

Comments are closed

Powered by BlogEngine.NET 1.6.0.0
Theme by Mads Kristensen | Modified by Mooglegiant


Disclaimer

This blog represents my personal hobby, observations and views. It does not represent the views of my employer, clients, especially my wife, children, in-laws, clergy, the dog, the cats or my daughter's horse. In fact, I am not even sure it represents my views when I take the time to reread postings.

All comments are moderated for content.

© Copyright 2008-2010