Please request the most recent XSL stylesheet and the reference agent code from support pd4ml.com by email.

I suspect the following: the default XSL stylesheet of the demo Notes database represents attachment files as

It takes a lot of time to parse such huge attribute value (if we are talking about tens of megabytes) and constantly reallocate string to store it.

The most recent XSL allows either to temporarily store the attachment to TMP directory and to refer to it from the attachment tag: or to represent the attachment as tag body data:a-lot-of-base64-data. Both approaches are intended to solve the performance issue.