Pawel Pindel
07/15/2026, 10:05 AMAnswer Overflow
07/15/2026, 10:05 AMspotter-code
07/15/2026, 10:06 AMinit() early and complete auth early.
A practical architecture that usually works best:
1. Primary view: one LiveboardEmbed (single iframe).
2. Custom UI layer in your app: dynamic titles, annotations, external legend panel, etc., rendered outside TS iframe.
3. Viz-focused interactions: use vizId mode only for drill-in/detail panels, not for all charts simultaneously.
4. Virtualize tabs/sections: mount only visible embeds; unmount hidden ones.
5. If you still need per-chart embeds: hard-cap concurrent embeds (e.g., 2–4), lazy-load the rest on scroll/user action.
javascript
import { init, AuthType, prefetch, LiveboardEmbed } from "@thoughtspot/visual-embed-sdk";
await prefetch("https://your-instance.thoughtspot.cloud");
init({
thoughtSpotHost: "https://your-instance.thoughtspot.cloud",
authType: AuthType.None,
// or callPrefetch: true (alternative to prefetch())
});
const liveboard = new LiveboardEmbed(document.getElementById("ts-liveboard"), {
liveboardId: "YOUR_LIVEBOARD_ID",
fullHeight: true
});
liveboard.render();
Suggestions:
- Treat each ThoughtSpot iframe as a “heavy process”; don’t keep many alive.
- For chart-specific filters, prefer controlling state in host app and applying scoped embed configuration only to the currently focused visualization.
- Use browser performance tooling to track heap growth when switching tabs; verify embeds are actually destroyed on unmount.spotter-code
07/15/2026, 10:06 AM