billboard.js
billboard.js copied to clipboard
How to debug stalled page
Running into a problem with bb, pages are freezing after placing tabs in background. Note that I'm refreshing the graphs with load on a regular basis.
I'd like to fix this, but I've tried different debugging techniques and not much luck.
Any suggestions on how best to debug / log it?
Note that I've set the tab not to be discarded in chrome://discards
Also, if you can enable the forums for this project that'd be great.
Similar to this issue: https://stackoverflow.com/questions/49291102/d3-js-background-tab-freeze-while-rendering-to-canvas
Need time to investigate the issue. It can be a d3.js related, but also how background works treated by the browsers. (Also related with the #1775)
check out the examples mentioned from the below link if freezes.
And also consider handling the load task based on the page visibility
document.addEventListener("visibilitychange", () => {
if (document.visibilityState === "visible") {
// restart the load
} else {
// stop loading & refreshing
}
});
Thanks for the link. The graphs are updated relatively infrequently (once per 30 seconds or so) but will try that as a workaround.
Rendering really needs to continue while the tab is not visible I think. I suppose I could queue it all up to be rendered when page is put back in foreground, but that will be an odd experience. Is the background rendering the cause of the page freezing? The link is not clear on that point.
Also check out the comment I left from: https://github.com/naver/billboard.js/issues/1775#issuecomment-773081716 There're limitations(or intentional restriction) from browsers on handling when tab is hidden.
Hmmm. That really sucks if true. It pretty much precludes using web apps for a rather massive category of usage scenarios.