[Mediawiki-l] I got the images to show...but question

Brion Vibber brion at pobox.com
Wed Sep 8 22:07:44 UTC 2004


heidialyssa wrote:
> Why the numbered subfolders? And what do they mean?

The uploads are broken up into separate smaller subdirectories so there 
are fewer files in each directory. (This matters more if you're a big 
site with tens of thousands of uploaded files.) There are a couple 
reasons for this:

* Some filesystems don't handle large numbers of files in a directory 
very efficiently. Smaller directories are faster to access.

* In theory you could break up the upload area across multiple 
drives/partitions if necessary.

* Doing a directory list on ten thousand files is kind of annoying. :) 
Smaller directories are easier to peek at when debugging.

The numbers are derived from a cryptographic hash of the filename and 
don't mean anything in particular; they're just there to divide things 
up evenly (whereas something like using the first letter of the filename 
would cause large clusters on some letters).

One problem however is that if PHP is running in "safe mode" the 
restrictions sometimes stop the subdirectories from working.

-- brion vibber (brion @ pobox.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : http://lists.wikimedia.org/pipermail/mediawiki-l/attachments/20040908/94d544a8/attachment.pgp 


More information about the MediaWiki-l mailing list