Performance and Scalability
Whether an application merges thousands of invoices overnight or keeps hundreds of Document Editors open at the same time, the same questions come up: how many documents one process creates in parallel, how much memory an editing session takes, how large a document may be and when another instance is needed. Developers and operators planning such a deployment get the answers from Text Control's measurements and recommendations, together with the code that applies them.
Two Kinds of Load
An application with TX Text Control .NET Server carries two kinds of work, which grow differently:
| Work | Where it runs | What it uses | Grows with |
|---|---|---|---|
Document processing with ServerTextControl and MailMerge: generating, merging, converting | In the process of your application, or in worker processes that it starts | CPU and memory, depending on the documents | The number and size of the documents |
| Editing sessions of the Document Editor | In a worker process of the backend TXTextControl.Web.Server.Core for each open editor | 50 to 150 MB of memory per session | The number of concurrent editors |
Text Control describes processing as unpredictable, CPU-heavy work and editing as predictable, memory-bound work. For many concurrent users, it recommends running them in separate services that scale on their own, as Scaling Beyond One Instance summarizes.
Find the Right Page
| If you want to | Read |
|---|---|
| Create documents on several threads, in request handlers or in background services | Threading |
Merge large batches in parallel worker processes with ParallelMailMerge | Multiple Processes |
| Size containers for editing sessions and scale document processing on CPU or queue length | Container Scaling |
| Understand where memory is used, dispose instances and watch editing sessions | Memory Usage |
| Show, upload, merge and process documents with thousands of pages | Large Documents |
| Apply measured recommendations and measure your own workload | Performance Best Practices |
Where to Start
- Performance Best Practices: the measures that make each document faster, from the choice of the engine to the moment the PDF is created.
- Threading: the rules for
ServerTextControlin a web application. - Multiple Processes when you process large batches, or Container Scaling when many users edit documents at the same time.
The Deployment Guide shows how to run several instances behind a load balancer, and Scaling Containers which requests need sticky sessions.