Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: All product images in one directory is a bad idea  (Read 10658 times)

Offline Palamedes

  • Newbie
  • *
  • Posts: 36
  • Karma: +5/-0
    • View Profile
    • RandomStringOfWords
All product images in one directory is a bad idea
« on: March 07, 2012, 02:56:04 PM »
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

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: All product images in one directory is a bad idea
« Reply #1 on: March 07, 2012, 04:06:15 PM »
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

Offline Palamedes

  • Newbie
  • *
  • Posts: 36
  • Karma: +5/-0
    • View Profile
    • RandomStringOfWords
Re: All product images in one directory is a bad idea
« Reply #2 on: March 07, 2012, 04:14:55 PM »
Migration for existing users might be an issue if you wait too long..  But thanks for getting to it  :)
« Last Edit: March 07, 2012, 04:19:12 PM by Palamedes »
~Pal

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: All product images in one directory is a bad idea
« Reply #3 on: March 08, 2012, 07:40:07 AM »
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

Offline Palamedes

  • Newbie
  • *
  • Posts: 36
  • Karma: +5/-0
    • View Profile
    • RandomStringOfWords
Re: All product images in one directory is a bad idea
« Reply #4 on: March 08, 2012, 05:45:07 PM »
Sweet!
~Pal

Offline Nimitz1061

  • Full Member
  • ***
  • Posts: 190
  • Karma: +22/-0
  • No matter where you go, there you are...
    • View Profile
Re: All product images in one directory is a bad idea
« Reply #5 on: June 26, 2012, 08:00:34 PM »
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

 

Powered by SMFPacks Social Login Mod