| name | documenso-performance-tuning |
| description | Optimize Documenso integration performance with caching, batching, and efficient patterns.
Use when improving response times, reducing API calls,
or optimizing bulk document operations.
Trigger with phrases like "documenso performance", "optimize documenso",
"documenso caching", "documenso batch operations".
|
| allowed-tools | Read, Write, Edit |
| version | 1.13.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","documenso","api","performance"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Documenso Performance Tuning
Overview
Optimize Documenso integrations for speed and efficiency. Key strategies: reduce API round-trips with templates, cache document metadata, batch operations with concurrency control, and use async processing for bulk signing workflows.
Prerequisites
- Working Documenso integration
- Redis or in-memory cache (recommended)
- Completed
documenso-sdk-patterns setup
Instructions
Step 1: Reduce API Calls with Templates
The biggest performance win: templates reduce a multi-step document creation (create + upload + add recipients + add fields + send = 5+ calls) to just 2 calls (create from template + send).
async function createDocumentManual(signer: { email: string; name: string }) {
const doc = await client.documents.createV0({ title: "Contract" });
await client.documents.setFileV0(doc.documentId, { file: pdfBlob });
const recip = await client.documentsRecipients.createV0(doc.documentId, {
email: signer.email, name: signer.name, role: "SIGNER",
});
await client.documentsFields.createV0(doc., {
: recip., : ,
: , : , : , : , : ,
});
client..(doc.);
}
() {
res = (
,
{
: ,
: { : , : },
: .({
: ,
: [{ : signer., : signer., : }],
}),
}
);
doc = res.();
(, {
: ,
: { : },
});
}