Best practices and recommendations

Best practices and recommendations

For performance optimization, the following best practices are recommended

Use the recommended SDK version

Always use the recommended SDK version.
ThoughtSpot publishes a new version of the SDK for every major ThoughtSpot Cloud release. Make sure you review the changelog to know about the new features and enhancements, breaking changes, bug fixes, and deprecated features.

Use the appropriate embed package

The SDK provides different packages for embedding ThoughtSpot components in your app. Choose the appropriate package that suits your requirement. For example, if you need to embed multiple visualizations, consider adding them to a Liveboard and embed that Liveboard in your app.

To avoid page scroll as visualizations load on a Liveboard, you can set the fullHeight property to true in the LiveboardEmbed code.

Call init early

Call the init method as early as possible and complete authentication on application load.

Prefetch and cache resources

Use the prefetch method in the SDK to prefetch and cache static resources required for loading the embedded components. Make sure you call the prefetch method before calling init and cache static assets as early as possible.

Cache query results

To cache query results, tune the underlying data warehouse.