If you're creating a DeepZoom collection in Silverlight 2, you will at some point have to get a massive amount of files into a web server's filesystem.
What DeepZoom Composer does is crunch source images into tiny tiles of images that are then intelligently served when a user is browsing a collection. What you're left with is a folder and series of sub-folders that is about 20% bigger, data-wise than the source images; but slightly more challenging is that it produces a large number of files. In the case below, 442 files.
Below, is just a quick observation/learning that is probably very, very obvious when you think about it, but worth noting so you don't have to discover it the hard way!
- Collection size: 24MB, 442 images, contained in folder structure
- Time taken to copy folder to USB Stick attached to my laptop – about 8 minutes
- Time taken to delete folder from USB stick attached to my laptop – about 6 minutes
The length of time is presumably because of the overhead of the computer opening new transfers/connections for each file. The data size for this collection was reasonably insignificant, so it must be that. Here's another way to do it though that I would heartily recommend, and again is presumably very obvious when you think about it:
- Amount of time to zip folder using 'send to compressed file' in Windows shell – about 45 seconds
- Amount of time to copy zipped folder to USB stick – about 30 seconds
- Time taken to delete single Zip file - about 5 seconds
The comparison of the two approaches? About 14 minutes versus less than 2 minutes!
So, do this every time:
- Zip your collection before copying it.. simple as that.
- If time is an issue, and you didn't follow my advice on zipping, use 'quick format' to delete the folder with loads of files in it - it takes about 30 seconds instead of 6 minutes! (and so obviously use a USB stick that is dedicated only to this task!)
UNLESS:
Actually, what we end up doing with these things most of the time is transferring them to a web server somewhere else. For this project, we are doing this via FTP obviously, and we are using Filezilla. We thought we were going to have to write some stuff to unzip the collection at the other end, but we also thought we'd see how Filezilla dealt with it. Here's how:
- Collection size: 24MB, 442 images, contained in raw unadulterated folders (not zipped)
- Total transfer time across 10mbit internet connection from Conchango's offices over the public internet to StreamUK: Under a minute!
So, two interesting things here:
- Filezilla is pretty smart about not getting caught up in the overhead of opening and closing connections for different files, and we have a super-fast internet connection (thanks Stuart)
- It's quite depressing that it takes less time to send that all via FTP over the internet to a remote data centre, than it does to transfer it to a USB stick attached to my machine!