# Appendix - Performance Optimisation

## Best Practice for Optimal Performance

There are several ways to optimise performance in UDiTH. This document is intended to help you find the best solution for your specific needs.

### Optimising the Model and Data

UDiTH is able to handle models and sessions of virtually any size, but performance depends on the device configuration in use. Depending on the operating system, CPU, GPU, and available RAM, there may be restrictions or limits affecting the use of UDiTH, just as with any other software.

In such cases, we recommend optimising your model with particular attention to the following:

#### Attribute Information

Although the number of attributes plays only a minor role in the overall model size, it can still affect overall performance. There are several ways to improve performance:

1. Avoid unnecessary attributes

   Many authoring systems create attributes that have no informational value for the user, such as colour, shading, and other information relevant only to the authoring system. By removing these attributes from the session in UDiTH Builder, you can streamline the information available in your session. The fewer attributes there are, the easier it is to navigate in UDiTH and the faster search and other functions perform.

2. Fixed attributes before custom attributes

   If you do not need to change attribute values while UDiTH is running, it is preferable to use the SDK import functions, for example the ExcelImport plugin, instead of Custom Attributes. Custom Attributes are loaded when the model is opened and can noticeably increase loading time if they are used extensively.

3. Optimise attribute hierarchy

   In UDiTH, you can define a custom hierarchy, allowing you to streamline the structure of your data. This can improve model performance and increase the speed at which attributes are displayed when object selections change.

#### Model Scope

Especially on mobile devices with more restrictive memory management, the scope of the model can affect performance. For such devices, we recommend using the package functionality in UDiTH Builder to divide the full model into smaller packages, while still allowing users to view those packages separately on their mobile device.

### Performance Options

The UDiTH settings include several options for adjusting viewer performance, affecting loading, caching, and shading of the model:

- Render quality level

  - Low - displays the model without shading. Recommended for the best performance.
  - Medium - displays simple shading. Recommended for overlapping surfaces.
  - High - provides the highest quality, including shadows. This also has the highest resource consumption.

- Triangles limit

  Defines the number of triangles displayed at the same time. The more triangles that are displayed, the better the visual quality, but the more performance is required.

- Memory mesh cache size (triangles)

  This setting defines the number of triangles kept in memory. It therefore affects RAM usage. Setting the memory mesh cache size to `0` disables caching, which may result in slightly longer reloading times but reduces memory usage on the viewing device.

- Memory model cache size (bytes)

  Sets the maximum amount of RAM available to the model. This setting controls memory usage and can be adjusted to suit devices with less available memory.

We recommend adjusting these settings either to values that suit most of your devices or, for maximum compatibility, to the lowest common setting. Users with more powerful workstations or devices, especially in terms of CPU, GPU, and RAM, can adjust these values individually and save their settings for later manual loading.

### The Alternatives

#### Upgrade the Hardware

> One alternative is to upgrade the hardware on your devices, for example the CPU, GPU, or RAM in workstations and desktops, or to use better-equipped mobile devices. This often leads to significantly better performance. When acquiring new hardware, consider these parameters for optimum performance.

#### Browser-Based Viewing

Alternatively, if none of the measures above leads to the expected results, you can use our browser-based viewing technology. This enables you to view your model in any industry-standard web browser without installation, plugins, or other requirements, apart from an internet or intranet connection to the server. The computing workload is moved to the cloud or to your corporate intranet. Although this requires powerful server-side hardware, it enables virtually any device to view models of any size at high performance.
