addAll with { wrapWithDirectory: true } is very slow

const sources = files.map((file) => ({ path: ${file.index}${extension}, content: file.buffer }));
for await (const result of ipfs.addAll(sources, { wrapWithDirectory: true })) {
Logger.log(Uploaded: ${result.path});
if (result.path === β€œβ€) {
rootCid = result.cid.toString();
}
}

const sources = files.map((file) => ({ path: root/${file.index}${extension}, content: file.buffer }));
for await (const result of ipfs.addAll(sources)) {
Logger.log(Uploaded: ${result.path});
if (result.path === β€œroot”) {
rootCid = result.cid.toString();
}
}

The rootCid will be the same for both of the above codes, but { wrapWithDirectory: true } is very slower. Why is this?