Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High CPU usage with C3 #1067

Open
ryankicks opened this issue Mar 18, 2015 · 3 comments
Open

High CPU usage with C3 #1067

ryankicks opened this issue Mar 18, 2015 · 3 comments
Labels
C-performance Category: A issue about performance resolved maybe

Comments

@ryankicks
Copy link

After I load a C3 chart using the below code, it seems to be taking up a lot of CPU usage. It all stems from the c3.generate() call.

I'm assuming the library is looking for browser resize/interaction updates. (Screen shot attached, where in Chrome the tag is constantly being updated/scanned.)

In my case, I only need to draw the chart but not do anything else. (I do have a lot of data points to work with.)

Is there a way to improve performance, perhaps by disabling this C3 behavior?

screen shot 2015-03-18 at 10 01 14 am

@aendra-rininsland
Copy link
Member

This is possibly a duplicate of #926, but unless you're calling generate() a lot, it's probably a separate issue.

Clearly there's something wrong with how C3's listening to the resize event. We really need to create a task force to troubleshoot the current spate of performance issues before they get any worse. See Google Group discussion.

Any suggestions and/or pull requests you can offer are very welcome.

@aendra-rininsland aendra-rininsland added the C-performance Category: A issue about performance label Mar 20, 2015
@masayuki0812
Copy link
Member

@ryankicks Sorry for the late response. I think resize_auto = false can be used. This option was introduced by this PR #860 and it's still rc version (0.4.11-rc2), but it will be release shortly.

@RejeanLabbe
Copy link

@masayuki0812 resize_auto = false doesn't work. In the "loadConfig" function, the key is splitted by "_" and the "find" function don't find the "resize" so it keeps the "true" value of the default config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-performance Category: A issue about performance resolved maybe
Projects
None yet
Development

No branches or pull requests

4 participants