Forum Moderators: open

Message Too Old, No Replies

Image directory structure and load times

Will putting images into a lot of subdirectories increase loading time?

         

Robert Charlton

10:09 pm on Aug 28, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I've just encountered a client site where images are divided up into a huge number (20-50) of directories and subdirectories.

Global images on the site, from different areas of the page, are put into individual subdirectories... and then images for each page are similarly distributed. These things are very orderly, but so nested it's almost byzantine. You might have spacer gifs in one directory, credit card logos in another, left nav in another, top headlines in another, etc etc....

I'd say that for a page to load, the server is probably pulling images from 12 to 20 different directories.

My question... is this enough of a drag on page load time that I should tell the client to consolidate these? It would be a lot of work for him, probably make it harder for him to keep track of stuff, and I hesitate to make the recommendation unless it's going to produce visible results.

dmorison

10:17 pm on Aug 28, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The filing systems of modern OS's are blindingly efficient; I can't imagine it making a perceivable difference between 20 or so directories and having all images in the one directory.

My initial thought when reading your post however was that using a complex directory structure increases page size considerably - as the full path to each image must be specified within the <img> tag.

Perhaps you could sell your client on the opportunity to reduce page size and the benefits that would offer...?

Robert Charlton

11:07 pm on Aug 28, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Perhaps you could sell your client on the opportunity to reduce page size and the benefits that would offer...?

Thanks... If the client had listened to me about page size, he wouldn't have included all those images. ;) He comes from a print art directing background, and it shows. I think the page size problems are of a much larger order of magnitude than path text.

Another question about the directories... Some of the image directory names have spaces in them, inconsistent with unix file naming conventions and not good practice, I know. There are no spaces in the image file names themselves... just the directories.

The hosting company tells me that their server will handle these and didn't think that they'd slow things down, but I'm wondering whether to push the client to fix them anyway. With global search and replace, it's not that hard a fix.

I don't want to start another thread on spaces in filenames, as there have already been some excellent ones on the board, but usually concerned about spidering and not about image loading times. Any comments?....

spaces in filenames
[webmasterworld.com...]

Which filenames are best for Google?
[webmasterworld.com...]

pleeker

12:04 am on Aug 29, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Robert -- does the site, and specifically the directories with spaces in the names, work in Netscape?

I've never seen a site with spaces in the directory names, but I have come across problems where Netscape was unable to deal with certain situations where page/filenames had space(s) in them.

That might be worth looking at if you haven't already.

And on the speed issue you first asked about, we used to be (5-6 years ago) very concerned about that issue, but not so much anymore. As dmorison said, efficiency is much better across the board now than it was then.

Robert Charlton

7:47 am on Aug 29, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Netscape 4.03, which is the version I have, reports, after a great many error messages, "Too many javascript errors"... but the site eventually seems to load. If the client tested it in Netscape (which I doubt), he's probably written it off. I wasn't even willing to try loading a second page.

An experience on another client's site regarding spaces... They had posted a bunch of pdf files with spaces in the file names. Though these displayed if the links on the site were clicked, when the links were right-clicked and the files downloaded to disk, the resulting file names contained %20 characters instead of spaces.

These files, with the %20s, would not open in Acrobat Reader when double-clicked. If renamed, they opened fine. Because right clicking on pdfs is a likely scenario, I had the client rename all the files.