1. Home
  2. Docs
  3. Advanced Topics
  4. Performance Optimization

Performance Optimization

Performance optimization is not necessary in the most common use cases of graph and chart. However if you do encounter performance issues, here are a few tips that can help you take the most out of the situation :

Check out the Large Data Sample

for graph charts , it is important to check out the Large Data sample that comes with Graph and Chart. You can learn more about it from the following link Handling large amounts of graph data

Use Hover Text instead of Item labels

Item labels are very versatile and help you visually customize you chart. However for some cases , their features are not really necessary and you can use Hover text instead. Check out Hover Text to learn more about this.

Make sure to use the Real time Overloads with Graph Charts

the graph chart has methods for both realtime and non realtime point adds. Make sure to use the right ones. check out the following resources : Graph Chart and Streaming Graph Chart

Use startBatch and endBatch Properly

StartBatch and EndBatch should be used with caution. EndBatch Triggers a full graph redraw, therefore it should not be used with realtime overloads. Also It is best to call endBatch in the same method of startBatch , it keeps things clean and ensures that the chart will redraw itself more then once.

Minimize visual features as much as possible

The more visual features in use , the more vertices you’ll have on your final scene , therefore make sure not to use visual features that are not necessary. For example the graph chart has points , fill and line . Sometimes disabling just one of these features can boost performance quite a bit.

MINIMIZE the use Of Realtime Animation

a common case if where a user calls AddPointToCategoryRealtime an specified an animation time that goes beyond the next point insertion.

for example , if you make a call to AddPointToCategoryRealtime every 1 second , and specify an animation time of 5 seconds. This means you will have 5 points animated at a given instance and it will look less clear to the user as well. Make sure the animation time is set to a reasonable value.

All standard unity optimizations apply too

Check your materials and draw calls. All the standard unity optimizations can help you increase performance. Check out this unity resource for more information

Try Asking support for more help

if you have gone through the sections above and still experiencing performance issues consider contacting support at: [email protected]