mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 08:58:38 +01:00
Shorten prefix to 2 characters
Using 2 hex characters [0-9a-f] will give us 16 * 16 = 256 root folders which seems more manageable than 4096 (16^3). Assuming a user has 10,000 attachments, they should roughly distribute at ~40 per folder with prefix length 2 rather than ~2.5 per folder with a prefix of 3.
This commit is contained in:
@@ -12,7 +12,7 @@ const {
|
||||
} = require('../../../../app/types/attachment/write_attachment_data');
|
||||
|
||||
|
||||
const PREFIX_LENGTH = 3;
|
||||
const PREFIX_LENGTH = 2;
|
||||
const NUM_SEPARATORS = 1;
|
||||
const NAME_LENGTH = 64;
|
||||
const PATH_LENGTH = PREFIX_LENGTH + NUM_SEPARATORS + NAME_LENGTH;
|
||||
|
||||
Reference in New Issue
Block a user