Skip to content

Commit 227d04c

Browse files
committed
Add note on performance
1 parent f0527d8 commit 227d04c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,13 @@ For instance:
335335
To enable access when converting trusted source documents,
336336
call `enableExternalFileAccess()`.
337337

338+
* The conversion may exhibit pathological performance on certain documents:
339+
it's likely possible to craft a source document that causes high CPU or memory usage.
340+
Depending on the performance constraints of your application and the likelihood of receiving untrusted input,
341+
you may wish to consider isolating any calls to Mammoth,
342+
such as running Mammoth in a separate thread with a timeout,
343+
to prevent denial-of-service attacks.
344+
338345
## Writing style maps
339346

340347
A style map is made up of a number of style mappings separated by new lines.

0 commit comments

Comments
 (0)