UI render latency when embedding
Hello everyone,
The UI takes significantly longer to render when embedding compared to accessing it directly from ThoughtSpot. Is there a specific reason for this? It seems I might not be the only one experiencing this issue, as the same problem can be observed here: https://youtu.be/9gi725YWd8s?t=1195
ThoughtSpot
YouTube
Intro to ThoughtSpot Everywhere for developers
If you're new to ThoughtSpot and curious about developing web apps with embedded analytics, this is the session for you!
Get a complete overview of ThoughtSpot Everywhere, the Developer Portal, Visual Embed SDK, and Playground — including a short demonstration on how to use the Playground to generate embedded components and build your first se...
12 Replies
@Sumedh Bajracharya embedding loads the whole site and has some overhead as well on top
the loads are comparable if you open any liveboard and hit reload vs loading the same in embed
where as loading a liveboard from the liveboard lists will be much much faster as lot of processing for is already done
additionally we have made performances fixes as well , can i know which version is your instance on ?
cc: @ashish lemme knw if i missed anything
Our current version is - 9.12.5.cl-220
Can try https://developers.thoughtspot.com/docs/prerender to improve performance if it fits your use case.
Prerender components
Prerender components to optimize user experience of your embedding application
const embed = new LiveboardEmbed(embedRef.current, {
frameParams: {},
liveboardId: pinboardId,
showLiveboardTitle: true,
isLiveboardHeaderSticky: false,
showLiveboardDescription: true,
hiddenActions: [Action.SpotIQAnalyze, Action.ShowUnderlyingData, Action.CrossFilter, Action.Share, Action.AIHighlights],
});
embed.prerenderGeneric();
embed.render();
Hi @ashish , I had tried this, but it seems to introduce a bug. From the liveboards page, when I click on any liveboard, it doesn't render the selected liveboard, but renders the Home page of the app embed. Is this a known bug or is there issue with the code?
cc: @Nirmal George Eapen
Calling the
prerenderGeneric
right before render does not help, ideally prerender
should be done on a page which the user lands on prior to going into the embedding, so that we give time for the prerender to complete.
We also just released a new version of the sdk with support for trying out the upcoming v2 shell, which should load 30-40% faster. Please update to the latest sdk and use enableV2Shell_experimental: true
flag when embedding the liveboard in the options.Thank you! We'll check and keep you posted later.
cc: @Sanjit @Nirmal George Eapen
Hello @ashish , I tried enabling the
enableV2Shell_experimental: true
flag for a liveboard embed and it is visibly around 40% faster as you mentioned. Thanks!
I was wondering if this is also meant to help when applied to AppEmbed, with pageId Liveboards or Home. These pages also load much faster. But with EmbedEvent.RouteChange, the parameter returns this (when clicked on a liveboard):
// with the flag set to true
{
"type": "ROUTE_CHANGE",
"data": {
"currentPath": "/pinboards" //no liveboard id
},
"status": "end"
}
-------------------------------------------------------
// with the flag set to false
{
"type": "ROUTE_CHANGE",
"data": {
"currentPath": "/pinboard/:pinboardId" //also returns liveboard id
}
}Thanks for reporting we will fix this. Please let us know if you find other issues
I think you are looking at the wrong page, it shows "/pinboards" (which is the pinboard list page) can you check what you get when open a particular liveboard ?
Case 1 - (flag set to
false
)
I'm in the home page. When click on a particular liveboard, the console log shows "/pinboard/:pinboardId" and then renders the selected liveboard.
Case 2 - (flag set to true
)
I'm in the home page. When click on a particular liveboard, the console log shows "/pinboards" and then renders the selected liveboard.
The rendering is not an issue, but we have a functionality that requires to get liveboard id when clicked on a liveboard. (Using the EmbedEvent.RouteChange event listener)
Reference - https://community.thoughtspot.com/s/question/0D53n00009LjmDWCAZ/can-we-identify-the-information-of-the-clicked-liveboard-in-the-full-app-embedded-uiGot it, thanks! cc @utsav.kapoor
Please let us know when we can expect a fix for this, thanks!
Anything on this? @ashish
@Sumedh Bajracharya - We identified the issue. We are working on fixing it. SRE team will respond on the ticket on expected ETA for the patch
Got it, thanks @utsav.kapoor !