Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

All product images in one directory is a bad idea

Started by Palamedes, March 07, 2012, 02:56:04 PM

Previous topic - Next topic

Palamedes

A system like this one will most likely inspire folks to add a lot of products.. With lots of products you will most likely get a lot of media in the form of images for each product.

Your system as it stands now creates 4 versions of each image in the form of thumbnails of various sizes.  So right there we have 4x the number of images actually uploaded.

And all of them live in image/thumbnails .. this is a bad idea .. It wont take long before this directory will bloat to ridiculous size..

Modern ext3 file system will allow you to have virtually an infinite number of entries so you are unlikely to run into the natural limit of the filesystem, but the more files you have in there the slower your file access time will be thus possibly adding a noticeable drag on page loads.   And you can't assume ext3 will be the file system.  NFS has a limit of 32k..

I would suggest each category or even each product getting it's own directory.. Currently images appear to be {productid/type}-{imageid}-{size}.extension

Probably not a bad idea to have the product id be a directory.
~Pal

abantecart

This is a valid future issue. We can build directories/files with the same approach it is done in resource library. Noted.

Thanks
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Palamedes

#2
Migration for existing users might be an issue if you wait too long..  But thanks for getting to it  :)
~Pal

abantecart

We will try to get this change to next version in about 1-2 weeks
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Palamedes

~Pal

Nimitz1061

Good to hear this.  File systems may tolerate a single folder system much better than a well secured FTP service.  So, the planned change will improve user experience on security sensitive hosts..

David

Forum Rules Code of conduct
AbanteCart.com 2010 -