In terms of speed for the user ?does the directory structure make any deference?

liunx

Guest
Does (A) having all your hundreds of HTML pages on the root directory and images in an image folder quicker than say (B) having your html pages split into several folders with each folder having less HTML pages .<br />
<br />
Remember I am talking about hundreds or thousands of pages and changing the directory structure would increase server performance FOR THE USER. <br />
<br />
I have my own answer to which is quicker through experimenting on one server, but I wont to see if others have there own findings or sources before I post my own dodgy results.<!--content-->well, having hundreds... or even thousands of pages in the same directory is bad organization. I work with a pretty complex network of web applications, and when I seem to have too many pages-its usually because I am not using my dynamic capability enough. <br />
<br />
Are you using serverside coding to reduce the numbers from thousands.... to the tens? <br />
<br />
That'd be a good start. I suppose at the 500+ level youd start to see the server slow down as it tried to find the page name. It really is a question of server speed in this case. Your examle might not be slow on my server... differences in hardware. <br />
<br />
When your getting dir's with more than 50 pages.... something is going wrong. If you have that many pages for a website, then you really need to look into server side coding, and dynamic page generation.<!--content-->you might see a very small performance gain by breaking down files into more folders, but think about it, the computer does not go searching for a file, maybe there are thousands of files in one directory, the computer does not open that directory and look at all the files to find the one it wants, humans do that, not computers! The computer has a "map" of where each and every file is on the system. It looks at the map and then goes to that address on the HDD. So in a sense all the files on any computer are all stored in one giant folder, the HDD. The files can be stored anywhere and everywhere (to a certain degree) on the HDD. Overtime, files become fragmented, the more fragmentation the longer it takes to read files because the disks must make extra rotations before the heads can read all the separate clusters (hence faster spindle speed HDDs speed up the process). So the best you can do is defrag, or optimize the data. Keeping less files in a folder is to help the "dumb" human to remember where everything is, not the computer.<!--content-->After a bit of research Kevin鎶
 
Back
Top