Chart.js: Toolstips slow performance in Chrome windows 10

Created on 2 Feb 2017  路  6Comments  路  Source: chartjs/Chart.js

I have problems with the performance in Chrome (56.0.2924.87) on windows 10. When displaying maybe 10 charts in a page and hovering over a datapoint the tooltip animates very slowly from the last selected point to the new. It's so slow that you get bored and the cpu fan on my pc starts. The pc should be about twice as fast as my old mac. In Firefox on Windows and in Chrome on mac hoovering tooltips is fast and smooth. I have enabled gpu ignore in chrome because I saw a few issues, but it didn't help. Anyone have an idea how to fix this issue?

help wanted needs test case bug enhancement

Most helpful comment

I have now logged the animations. There is only one animation, so the problem is that the requestAnimationFrame isn't triggered at normal rate. The skipFrames doesn't help because that only skips frames based on the time used to draw, not time spent between requestAnimationFrames. I think it's a chrome bug.

All 6 comments

I fixed the issue by changing the parent container to another class. I'm using bulma as styling.

It didn't help. I will try to find the issue, it must be that chrome on my pc fires some events ofter than normal and Chart.js reacts to them and redraw. I just noticed that scrolling of the page is also very slow, but smooth in Firefox.

Is this related to #3746? If so, could you try the PR in #3856 ?

Probably related, but it was slower when using the PR in #3856. I tried with only two charts in the page and it was fast in Chrome, so I think my problem is that the events is fired on all the charts. I don't know why that only happens in Chrome on Windows. I have logged onHover and onResize. OnHover only fire for the selected chart and only passes an array of active elements when I hover over a point. OnResize only fires when chart is inited/first paint or if I resize the window ;).

I have now logged the animations. There is only one animation, so the problem is that the requestAnimationFrame isn't triggered at normal rate. The skipFrames doesn't help because that only skips frames based on the time used to draw, not time spent between requestAnimationFrames. I think it's a chrome bug.

Closing since this looks to be a bug in Chrome

Was this page helpful?
0 / 5 - 0 ratings