From 1438fd81067a9b1f2befbd8b52d2255fe22e574e Mon Sep 17 00:00:00 2001 From: Ruben Taelman Date: Mon, 23 Nov 2020 13:41:55 +0100 Subject: [PATCH] docs: add warning to ExtensionBasedMapper regarding performance Closes #333 --- src/storage/mapping/ExtensionBasedMapper.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/storage/mapping/ExtensionBasedMapper.ts b/src/storage/mapping/ExtensionBasedMapper.ts index fe54af7db..89badf876 100644 --- a/src/storage/mapping/ExtensionBasedMapper.ts +++ b/src/storage/mapping/ExtensionBasedMapper.ts @@ -36,6 +36,11 @@ export interface ResourcePath { * a new extension will be appended (with a `$` in front of it). * E.g. if the path is `input.ttl` with content-type `text/plain`, the path would actually be `input.ttl$.txt`. * This new extension is stripped again when generating an identifier. + * + * Warning: Since this mapper iterates over all files in the requested directory, + * it can experience performance issues over directories with a huge number of files (10.000+). + * For typical directory structures, the performance of this mapper should be sufficient. + * @see https://github.com/solid/community-server/issues/333 */ export class ExtensionBasedMapper implements FileIdentifierMapper { protected readonly logger = getLoggerFor(this);