import ThemedImage from '@theme/ThemedImage';
import useBaseUrl from '@docusaurus/useBaseUrl';

## Example performance data

The following tables show peak memory consumption and processing times across a range of synthetic and real world files.  For typical production workloads, processing completes in less than one second and uses under 4GB RAM.

### Complexity

Memory consumption depends on how complex a file is, based on the number and type of elements the engine evaluates. For example, a small but complex Excel workbook with many sheets may consume more memory than a large but simple image file. File complexity scores are included in the engine’s analysis report. In most cases, real files score no higher than 7, with a maximum value of 10. The table below shows some examples, from synthetically generated files, of how complexity scales with the number of objects.

| Format | File size (MB) | Complexity | Description of file contents          |
|--------|----------------|------------|---------------------------------------|
| DOCX   | 0.038          | 5.2        | 64 lines                              |
| DOCX   | 0.043          | 5.22       | 512 lines                             |
| DOCX   | 0.094          | 5.43       | 5000 lines                            |
| DOCX   | 0.606          | 6.1        | 50000 lines                           |
| DOCX   | 2.311          | 6.66       | 200000 lines                          |
| PPTX   | 0.239          | 5.13       | 2000 external hyperlinks              |
| PPTX   | 0.451          | 5.4        | 4000 external hyperlinks              |
| PPTX   | 1.725          | 5.98       | 16000 external hyperlinks             |
| PPTX   | 3.428          | 6.28       | 32000 external hyperlinks             |
| PPTX   | 13.663         | 6.88       | 128000 external hyperlinks            |
| XLSX   | 0.007          | 3.39       | 2 images, each 10x10 pixels           |
| XLSX   | 0.019          | 3.76       | 32 images, each 10x10 pixels          |
| XLSX   | 0.205          | 4.77       | 512 images, each 10x10 pixels         |
| XLSX   | 1.600          | 5.66       | 4096 images, each 10x10 pixels        |
| XLSX   | 12.807         | 6.56       | 32768 images, each 10x10 pixels       |
| PDF    | 0.002          | 3.09       | 2 images, each 10x10 pixels           |
| PDF    | 0.024          | 4.12       | 32 images, each 10x10 pixels          |
| PDF    | 0.380          | 5.65       | 512 images, each 10x10 pixels         |
| PDF    | 3.063          | 7.26       | 4096 images, each 10x10 pixels        |
| PDF    | 6.149          | 7.85       | 8912 images, each 10x10 pixels        |

### Real world files examples

| Format | File size (MB) | Complexity | Protect - Processing time (seconds) | Protect - Peak Memory Usage (GB) | Export/Import - Processing time (seconds) | Export/Import - Peak Memory (GB) |
|--------|----------------|------------|-------------------------------------|----------------------------------|-------------------------------------------|----------------------------------|
| PNG    | 0.402          | 0.90       | 0.028                               | 0.143                            | 0.048                                     | 0.114                            |
| JPEG   | 0.251          | 1.28       | 0.037                               | 0.091                            | 0.027                                     | 0.098                            |
| JPEG   | 0.112          | 1.32       | 0.032                               | 0.093                            | 0.017                                     | 0.116                            |
| PNG    | 1.008          | 1.54       | 0.049                               | 0.126                            | 0.109                                     | 0.192                            |
| JPEG   | 0.251          | 1.67       | 0.087                               | 0.104                            | 0.031                                     | 0.091                            |
| MP4    | 2.411          | 2.10       | 0.055                               | 0.123                            | 0.242                                     | 0.203                            |
| PNG    | 0.603          | 2.43       | 0.033                               | 0.141                            | 0.071                                     | 0.135                            |
| MP4    | 23.705         | 2.84       | 0.367                               | 0.275                            | 2.248                                     | 0.327                            |
| XLSX   | 0.012          | 3.66       | 0.035                               | 0.147                            | 0.105                                     | 0.190                            |
| MP4    | 103.222        | 4.06       | 1.616                               | 0.500                            | 9.910                                     | 0.905                            |
| PPTX   | 0.143          | 4.29       | 0.111                               | 0.197                            | 0.384                                     | 0.161                            |
| PDF    | 8.691          | 4.50       | 0.587                               | 0.234                            | 1.695                                     | 0.302                            |
| DOCX   | 0.038          | 4.55       | 0.154                               | 0.113                            | 0.607                                     | 0.199                            |
| DOCX   | 0.040          | 4.65       | 0.172                               | 0.140                            | 0.759                                     | 0.183                            |
| XLSX   | 0.034          | 4.72       | 0.151                               | 0.168                            | 0.957                                     | 0.293                            |
| PPTX   | 1.128          | 4.80       | 0.485                               | 0.173                            | 1.240                                     | 0.273                            |
| PDF    | 0.221          | 5.16       | 0.160                               | 0.159                            | 0.664                                     | 0.205                            |
| XLSX   | 0.376          | 5.87       | 1.745                               | 0.317                            | 14.111                                    | 1.186                            |
| PPTX   | 0.643          | 5.87       | 1.144                               | 0.194                            | 11.635                                    | 0.664                            |
| DOCX   | 0.206          | 5.92       | 2.855                               | 0.305                            | 12.701                                    | 0.936                            |
| PDF    | 1.462          | 6.03       | 0.699                               | 0.232                            | 6.697                                     | 0.470                            |

### Complex real world file examples

| Format | File size (MB) | Complexity | Protect - Processing time (seconds) | Protect - Peak Memory (GB) | Export/Import - Processing time (seconds) | Export/Import - Peak Memory (GB) |
|--------|----------------|------------|-------------------------------------|-----------------------------|-------------------------------------------|----------------------------------|
| PDF    | 1.045          | 6.01       | 0.816                               | 0.171                       | 3.441                                     | 0.306                            |
| PPTX   | 6.462          | 6.04       | 1.999                               | 0.296                       | 18.243                                    | 1.179                            |
| PPTX   | 0.702          | 6.05       | 1.639                               | 0.425                       | 19.065                                    | 1.418                            |
| XLSX   | 1.120          | 6.07       | 2.352                               | 0.255                       | 17.993                                    | 0.985                            |
| XLSX   | 0.716          | 6.17       | 3.152                               | 0.388                       | 26.734                                    | 1.715                            |
| PDF    | 1.315          | 6.20       | 0.814                               | 0.182                       | 10.764                                    | 0.611                            |
| PPTX   | 1.988          | 6.21       | 2.315                               | 0.193                       | 26.198                                    | 1.316                            |
| XLSX   | 1.681          | 6.33       | 4.632                               | 0.434                       | 39.617                                    | 2.213                            |
| DOCX   | 0.477          | 6.47       | 11.581                              | 0.892                       | 50.325                                    | 3.208                            |
| PDF    | 1.519          | 6.51       | 0.927                               | 0.194                       | 19.823                                    | 0.998                            |
| XLSX   | 2.031          | 6.56       | 7.713                               | 0.441                       | 64.021                                    | 3.140                            |
| PDF    | 1.935          | 6.80       | 2.607                               | 0.317                       | 45.199                                    | 2.128                            |
| DOCX   | 1.471          | 6.95       | 18.820                              | 2.144                       | 114.765                                   | 10.195                           |
| PDF    | 3.553          | 7.08       | 3.795                               | 0.479                       | 62.265                                    | 2.964                            |
| PDF    | 3.768          | 7.24       | 3.670                               | 0.237                       | 96.422                                    | 4.503                            |

### Synthetic file examples

| Format | File size (MB) | Complexity | Protect - Processing time (seconds) | Protect - Peak Memory Usage (GB) | Export/Import - Processing time (seconds) | Export/Import - Peak Memory (GB) | Description of file contents |
|--------|----------------|------------|-------------------------------------|----------------------------------|-------------------------------------------|----------------------------------|------------------------------|
| PDF    | 0.001          | 2.88       | 0.014                               | 0.113                            | 0.020                                     | 0.079                            | 2 external hyperlinks |
| PDF    | 0.002          | 3.09       | 0.014                               | 0.089                            | 0.024                                     | 0.083                            | 2 images, each 10x10 pixels |
| XLSX   | 0.007          | 3.39       | 0.029                               | 0.102                            | 0.064                                     | 0.099                            | 2 images, each 10x10 pixels |
| XLSX   | 0.008          | 3.63       | 0.029                               | 0.114                            | 0.101                                     | 0.112                            | 2 charts |
| PDF    | 0.005          | 3.70       | 0.015                               | 0.078                            | 0.044                                     | 0.113                            | 32 external hyperlinks |
| XLSX   | 0.019          | 3.76       | 0.099                               | 0.108                            | 0.132                                     | 0.141                            | 32 images, each 10x10 pixels |
| PDF    | 0.024          | 4.12       | 0.020                               | 0.090                            | 0.103                                     | 0.115                            | 32 images, each 10x10 pixels |
| PPTX   | 0.042          | 4.36       | 0.125                               | 0.117                            | 0.478                                     | 0.159                            | 2 charts |
| XLSX   | 0.035          | 4.55       | 0.139                               | 0.113                            | 0.755                                     | 0.151                            | 32 charts |
| XLSX   | 0.205          | 4.77       | 1.383                               | 0.125                            | 1.334                                     | 0.210                            | 512 images, each 10x10 pixels |
| PDF    | 0.075          | 4.87       | 0.046                               | 0.079                            | 0.440                                     | 0.137                            | 512 external hyperlinks |
| PPTX   | 0.255          | 5.06       | 0.810                               | 0.113                            | 2.559                                     | 0.209                            | 32 charts |
| PPTX   | 0.239          | 5.13       | 0.697                               | 0.115                            | 2.251                                     | 0.181                            | 2000 external hyperlinks |
| XLSX   | 0.119          | 5.14       | 0.499                               | 0.148                            | 2.851                                     | 0.289                            | 128 charts |
| DOCX   | 0.038          | 5.20       | 0.353                               | 0.121                            | 2.606                                     | 0.257                            | 64 lines |
| DOCX   | 0.037          | 5.20       | 0.373                               | 0.127                            | 2.6 07                                     | 0.257                            | 2 images, each 1x1 pixel |
| DOCX   | 0.043          | 5.22       | 0.375                               | 0.121                            | 2.742                                     | 0.271                            | 512 lines |
| DOCX   | 0.062          | 5.29       | 0.814                               | 0.124                            | 3.364                                     | 0.289                            | 256 images, each 1x1 pixel |
| PPTX   | 0.451          | 5.40       | 1.424                               | 0.126                            | 4.271                                     | 0.231                            | 4000 external hyperlinks |
| DOCX   | 0.094          | 5.43       | 0.643                               | 0.138                            | 4.290                                     | 0.338                            | 5000 lines |
| PDF    | 0.380          | 5.65       | 0.267                               | 0.141                            | 1.518                                     | 0.227                            | 512 images, each 10x10 pixels |
| DOCX   | 0.091          | 5.65       | 2.230                               | 0.209                            | 8.533                                     | 0.519                            | 2048 images, each 1x1 pixel |
| XLSX   | 1.600          | 5.66       | 91.552                              | 0.246                            | 15.003                                    | 0.710                            | 4096 images, each 10x10 pixels |
| XLSX   | 0.457          | 5.73       | 1.988                               | 0.191                            | 11.183                                    | 0.601                            | 512 charts |
| PDF    | 0.604          | 5.78       | 0.281                               | 0.186                            | 3.386                                     | 0.303                            | 4096 external hyperlinks |
| PPTX   | 1.725          | 5.98       | 8.293                               | 0.153                            | 18.819                                    | 0.573                            | 16000 external hyperlinks |
| DOCX   | 0.606          | 6.10       | 3.423                               | 0.394                            | 19.162                                    | 1.271                            | 50000 lines |
| DOCX   | 0.198          | 6.20       | 10.333                              | 0.462                            | 30.985                                    | 1.636                            | 10000 images, each 1x1 pixel |
| PPTX   | 3.656          | 6.21       | 12.352                              | 0.153                            | 36.349                                    | 1.146                            | 512 charts |
| PPTX   | 3.428          | 6.28       | 33.142                              | 0.191                            | 54.816                                    | 0.959                            | 32000 external hyperlinks |
| XLSX   | 12.807         | 6.56       | 1041.659                            | 1.027                            | 508.494                                   | 4.637                            | 32768 images, each 10x10 pixels |
| XLSX   | 3.626          | 6.63       | 20.287                              | 0.592                            | 92.785                                    | 4.079                            | 4096 charts |
| DOCX   | 2.311          | 6.66       | 12.707                              | 1.136                            | 69.830                                    | 5.043                            | 200000 lines |
| PDF    | 4.920          | 6.69       | 2.215                               | 0.391                            | 27.451                                    | 1.729                            | 32768 external hyperlinks |
| DOCX   | 0.600          | 6.76       | 31.337                              | 1.492                            | 118.010                                   | 6.194                            | 40000 images, each 1x1 pixel |
| PPTX   | 13.663         | 6.88       | 560.821                             | 0.460                            | 609.425                                   | 3.823                            | 128000 external hyperlinks |
| PPTX   | 29.088         | 7.10       | 139.941                             | 0.466                            | 330.423                                   | 9.145                            | 4096 charts |
| PDF    | 3.063          | 7.26       | 48.977                              | 0.215                            | 58.920                                    | 0.810                            | 4096 images, each 10x10 pixels |
| PDF    | 6.149          | 7.85       | 363.602                             | 0.298                            | 383.711                                   | 1.550                            | 8192 images, each 10x10 pixels |

### Synthetic file performance graphs

<ThemedImage
  alt="Complexity vs Processing Time"
  sources={{
    light: useBaseUrl('/.attachments/complexity_vs_processing_time_for_synthetic_files(protect)-light.jpg'),
    dark: useBaseUrl('/.attachments/10-engine-data-dark.png'),
  }}
/>

<ThemedImage
  alt="Complexity vs Processing Time"
  sources={{
    light: useBaseUrl('/.attachments/complexity_vs_processing_time_for_synthetic_files(export-import)-light.jpg'),
    dark: useBaseUrl('/.attachments/11-engine-data-dark.png'),
  }}
/>

<ThemedImage
  alt="Complexity vs Peak Memory Usage"
  sources={{
    light: useBaseUrl('/.attachments/complexity_vs_peak_memory_usage_for_synthetic_files(protect)-light.jpg'),
    dark: useBaseUrl('/.attachments/12-engine-data-dark.png'),
  }}
/>

<ThemedImage
  alt="Complexity vs Peak Memory Usage"
  sources={{
    light: useBaseUrl('/.attachments/complexity_vs_processing_time_for_synthetic_files(export-import)-light.jpg'),
    dark: useBaseUrl('/.attachments/13-engine-data-dark.png'),
  }}
/>