# Performance Tips

The RadSpreadsheet control is optimized to bring a great performance, but this can be improved even further by keeping in mind the following tips and tricks.

* **RadSpreadsheet** supports **UI Virtualization** (enabled by default), which enables it to process only the information that is loaded in the viewable area. In this way, UI elements are created only for the parts of the document actually shown on screen, reducing the memory footprint of the application and speeding up the loading time. Avoid placing RadSpreadsheet in a container that measures it with infinity (for example, **ScrollViewer**, **StackPanel**, or a **Grid** with a row/column set to `Auto`), because in that case RadSpreadsheet cannot determine what part of the document is shown in the viewport and virtualization turns off.

* The  RadSpreadsheet control uses the document model of [RadSpreadProcesing](https://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/overview). Check the [Performance Tips and Tricks](https://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/performance) article of the library to see how to optimize the document model.

* Use the [NoXaml](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/xaml-vs-noxaml) Telerik dlls. This will improve the initial loading performance.

* The usability of the control can be improved also by preloading the view that will display the RadSpreadsheet. This won't boost the general performance, but will move the WPF resources loading behavior before the view is displayed, thus improving the later interactions with the application. To preload the control, you should add it (but hidden) to the visual tree of the application at some point around startup. The exact place will depend on the specific application setup. The [following KB article](https://www.telerik.com/products/wpf/documentation/knowledge-base/kb-spreadsheet-preload-resources) shows one way to do this.

* If using [RadSpreadsheetRibbon](https://www.telerik.com/products/wpf/documentation/controls/radspreadsheet/spreadsheet-ui), remove the tabs or other elements that are not necessary in the application. To do this, you can use the [ChildrenOfType](https://www.telerik.com/products/wpf/documentation/common-information/common-visual-tree-helpers) extension method, or you can [modify the ControlTemplate](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/styling-apperance-editing-control-templates) of RadSpreadsheetRibbon.

  **Using the ChildrenOfType method to remove the first tab from the ribbon control**

  ```C#
  this.spreadsheetRibbon.ChildrenOfType<RadRibbonView>().FirstOrDefault().Items.RemoveAt(0);
  ```

* If using [RadSpreadsheetRibbon](https://www.telerik.com/products/wpf/documentation/controls/radspreadsheet/spreadsheet-ui), set its `IsMinimized` property to `true`.

  **Minimizing the ribbon control**

  ```XAML
  <telerik:RadSpreadsheetRibbon IsMinimized="True" />
  ```

* Use .NET 8 or later, instead of .NET Framework, because the general WPF performance there is improved.

## See Also

* [Visual Structure](https://www.telerik.com/products/wpf/documentation/controls/radspreadsheet/visual-structure)
* [Working with UI Selection](https://www.telerik.com/products/wpf/documentation/controls/radspreadsheet/ui-working-with-selection)
