Dolibarr / dolibarr

Dolibarr ERP CRM is a modern software package to manage your company or foundation's activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). it's an open source Web application (written in PHP) designed for businesses of any sizes, foundations and freelancers.
https://www.dolibarr.org
GNU General Public License v3.0
5.07k stars 2.67k forks source link

Improve ECM file organisation for products #29318

Open creekorful opened 2 months ago

creekorful commented 2 months ago

Feature Request

Currently in Dolibarr the ECM files for all objects are stored under a same parent directory representing the object type. The problem is with that particular structure we can get a LOT of directories all in the same parent. This can be true especially for products.

We have a customer having > 1,300,000 products in their database (all in the same entity) and therefore the same amount of folders in disk.

The problem is that when we try to use the shell on the server it's not usable because you can take several coffees before you get an answer back from your terminal.


I think we should rework the way the files are stored on disk (at least for the products), maybe with an hidden configuration flag?

Storing the products using a B-tree mechanism or using the supplier ID as parent would greatly improve performances.

Let's discuss that.

Use case

No response

Suggested implementation

No response

Suggested steps

No response

dolibarr95 commented 2 months ago

Hello The old version of Dolibarr got a specific way to store photos etc folder 1/0/2/5/8/etc look at PRODUCT_USE_OLD_PATH_FOR_PHOTO

JonBendtsen commented 2 months ago

while we are at it, I wish that there could be some kind of version control on files, and/or maybe some cloud file storage solution like Nextcloud, Owncloud, ... or perhaps something like the S3 protocol.