covalent
covalent copied to clipboard
CPU usage is high when set dynamic data
Do you want to request a feature or report a bug?
report a bug.
Feature Request
Bug Report
when we set dynamic data to line chart every 3 second, CPU usage is about 90%...
Which version of Angular and Material, and which browser and OS does this issue affect?
"@angular/animations": "7.2.12",
"@angular/cdk": "7.3.7",
"@angular/common": "7.2.12",
"@angular/compiler": "7.2.12",
"@angular/core": "7.2.12",
"@angular/forms": "7.2.12",
"@angular/http": "7.2.12",
"@angular/material": "7.3.7",
chrome: 75.0.3770.142 OS: mac 10.14.2 (18C54)
Hi @duxy2002,
It would help the debugging process a lot if you can provide us a stackblitz demo so we can reproduce it on our end.
Can you send us a .gif of your dynamic data line chart demo & activity monitor
display w/ the cpu activity displayed?
What are the specs of your box this demo is running on?
HI @stevenov7
Sorry。My mistake. I use interval() of [email protected] to set data every 3 seconds. But I figure out that there was a wrong way to use interval(), that caused setting data dynamically every one second...
BTW, I found there is a conflict with angular change detection and echarts. https://github.com/apache/incubator-echarts/issues/7047. I modified chart.component.ts as below and improve performance even if setting data dynamically every one second.
Something to take into account for beta.2, would be nice to improve performance.