E
E
entermix2015-06-10 15:58:49
PHP
entermix, 2015-06-10 15:58:49

What threatens a large number of folders?

Let's say there is a site that publishes news to which you can attach files, the files are stored in approximately the following order:
uploads/news/<news_id>/
In the future, there will be a bunch of other folders in the uploads / news / folder .. what could this threaten in the future? Is it worth rewriting the storage as follows:
uploads/<год>/<месяц>/<день>/<news_id>/

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasily Vasilyev, 2018-08-23
@Basil_Dev

To write it - 20 minutes, with tests.
Each word is a number that has its own digit (1, 10, 100, 1000, ..., depending on the position in the line). Slice by space, translate into numbers (dictionary 1-19, 20-90, 100-100 ... 0), multiply by the digit and sum.

E
Eddy_Em, 2015-06-10
@entermix

A large number of folders threatens to clutter your desktop. It is better to throw away unnecessary papers immediately.
But in the case of subdirectories, you need to keep in mind that the greater the number of subdirectories, the longer the search will take. But if you don’t have to look for anything there, and the directory name is taken from the database, then don’t give a damn.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question