0

I included four ngx-charts in a template, two pie-charts and two line-charts. Data are fed by async pipes for all of them. Since we need to keep these data up-to-date, a new "results" list is pushed into each async pipe every 5 seconds.

The first line-chart receives a single-series as defined in the documentation, while the second one receives a multi-series. The multi-series contains about 10 single series with 20 key-value pairs each.

Everything works fine right away, but the line-charts cause the web-app to freeze after 10 to 20 minutes. Sometimes the app recovers in a few seconds, but sometimes it crashes (white screen, endless wait). No error is displayed on the console and we can't spot any network or memory usage anomalies. The same happens with area-charts, while having only pie-charts works fine. Has anyone experienced this type of malfunction?

Thanks!

  • Do you keep your page opened for 20 minutes and not go on any other tab ? Which browser are you using ? Do you clear previous values or concatenate them ? –  Sep 23 '19 at 10:39
  • It happens both when remaining on the same tab and going on another one. We are using Chrome. Values are refreshed as follows: a new list is created, then subject.next(list) is invoked. Thanks – Alan Del Piccolo Sep 23 '19 at 10:58
  • If the tab was switched, then I would understand, because chrome "pauses" background tabs. If you were concatenating the data, this would be a momry issue, again understandable. But with what you're saying, I'm afraid the only way of resolving it is to provide a [mcve] of your issue so that we can see the problem first hand. –  Sep 23 '19 at 11:04
  • We reproduced the problem here: [link] (https://stackblitz.com/edit/angular-cqp7pw). The multi-series is smaller here than in our case, yet the app freezes nonetheless, although after a longer period. We may have noticed that the problem actually occurs mostly when the tab is switched, yet a total crash of the app - that is, no recovery from freezing - should not happen anyway. – Alan Del Piccolo Sep 24 '19 at 07:19
  • I've been waiting, to no result ... Maybe it's coming from your own computer ? Maybe the Chrome settings ? It could also be the library, but I don't have an issue with it ... I'll wait more and see what happens anyway –  Sep 24 '19 at 07:41
  • Okay I got it (I think), the graph has disappeared from the page, but when I click on the page the data comes back and nothing is frozen. Is that it ? –  Sep 24 '19 at 08:21
  • Yes, partly. But sometimes the freeze is irreversible. I would say half of the times approximately. The browser then shows the pop-up in order to either wait or close the tab. In the real app the whole page goes blank, not only the graph. This does not happen for the other pages of the app. We tested this on two different computers. – Alan Del Piccolo Sep 24 '19 at 09:00
  • Did you try using `setInterval` instead of `rxjs.interval` ? –  Sep 24 '19 at 09:04
  • We did now, unfortunately with no results. – Alan Del Piccolo Sep 24 '19 at 11:55

0 Answers0