billboard.js icon indicating copy to clipboard operation
billboard.js copied to clipboard

How to debug stalled page

Open blazespinnaker opened this issue 4 years ago • 6 comments

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.

blazespinnaker avatar Feb 01 '21 13:02 blazespinnaker

Similar to this issue: https://stackoverflow.com/questions/49291102/d3-js-background-tab-freeze-while-rendering-to-canvas

blazespinnaker avatar Feb 01 '21 13:02 blazespinnaker

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)

netil avatar Feb 02 '21 06:02 netil

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
    }
});

netil avatar Feb 04 '21 07:02 netil

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.

blazespinnaker avatar Feb 04 '21 17:02 blazespinnaker

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.

netil avatar Feb 05 '21 02:02 netil

Hmmm. That really sucks if true. It pretty much precludes using web apps for a rather massive category of usage scenarios.

blazespinnaker avatar Feb 13 '21 23:02 blazespinnaker