{"action":"created","issue":{"url":"https://api.github.com/repos/masayuki0812/c3/issues/995","labels_url":"https://api.github.com/repos/masayuki0812/c3/issues/995/labels{/name}","comments_url":"https://api.github.com/repos/masayuki0812/c3/issues/995/comments","events_url":"https://api.github.com/repos/masayuki0812/c3/issues/995/events","html_url":"https://github.com/masayuki0812/c3/issues/995","id":57541788,"number":995,"title":"Push data performantly","user":{"login":"pehrlich","id":407497,"avatar_url":"https://avatars.githubusercontent.com/u/407497?v=3","gravatar_id":"","url":"https://api.github.com/users/pehrlich","html_url":"https://github.com/pehrlich","followers_url":"https://api.github.com/users/pehrlich/followers","following_url":"https://api.github.com/users/pehrlich/following{/other_user}","gists_url":"https://api.github.com/users/pehrlich/gists{/gist_id}","starred_url":"https://api.github.com/users/pehrlich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pehrlich/subscriptions","organizations_url":"https://api.github.com/users/pehrlich/orgs","repos_url":"https://api.github.com/users/pehrlich/repos","events_url":"https://api.github.com/users/pehrlich/events{/privacy}","received_events_url":"https://api.github.com/users/pehrlich/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-13T00:26:25Z","updated_at":"2015-03-12T13:14:40Z","closed_at":null,"body":"Ok, so in my use case, I've got a reasonable number of points (some 500 per chart line, three lines per chart), and about every 20 ms I'm pushing a new data point with `chart.load`.  This load causes a redraw, which causes the event rects (500) to be rebuilt.  It seems like it should be possible to only redraw new or changed rects, while leaving the rest untouched.\r\n\r\nHere's a performance profile:\r\n\r\n![screenshot 2015-02-12 16 25 07](https://cloud.githubusercontent.com/assets/407497/6179978/b96c0f18-b2d3-11e4-89ee-400b2bb41fed.png)\r\n\r\n\r\nMost of the time is being taken up in the two methods within redraw:  `redrawEventRect` and `redrawCircle`.    I suspect a couple of optimizations may be possible:\r\n\r\n - What are circles? I believe my chart has none, and so this method could be bypassed entirely.  (my `config.point = {show: false};`)  \r\n - The redrawEventRect may be able to be called for only one rect (the additional point) or for none at all (there are no new rects being added, only additional points to existing rects).\r\n\r\nPerhaps there could be some sort of global dirty tracking, or more simply, a set for updating passed from load - if updates are necessary at all.\r\n\r\nI am stymied for a moment in my digging, as `redrawEventRect` seems like it must be called for tooltips.\r\n\r\nCan you suggest a good course of action?\r\n\r\nCheers!\r\n\r\nPS The animation `duration=0` update in 0.4.9 was a boon. thanks."},"comment":{"url":"https://api.github.com/repos/masayuki0812/c3/issues/comments/78476606","html_url":"https://github.com/masayuki0812/c3/issues/995#issuecomment-78476606","issue_url":"https://api.github.com/repos/masayuki0812/c3/issues/995","id":78476606,"user":{"login":"masayuki0812","id":1142423,"avatar_url":"https://avatars.githubusercontent.com/u/1142423?v=3","gravatar_id":"","url":"https://api.github.com/users/masayuki0812","html_url":"https://github.com/masayuki0812","followers_url":"https://api.github.com/users/masayuki0812/followers","following_url":"https://api.github.com/users/masayuki0812/following{/other_user}","gists_url":"https://api.github.com/users/masayuki0812/gists{/gist_id}","starred_url":"https://api.github.com/users/masayuki0812/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masayuki0812/subscriptions","organizations_url":"https://api.github.com/users/masayuki0812/orgs","repos_url":"https://api.github.com/users/masayuki0812/repos","events_url":"https://api.github.com/users/masayuki0812/events{/privacy}","received_events_url":"https://api.github.com/users/masayuki0812/received_events","type":"User","site_admin":false},"created_at":"2015-03-12T13:14:40Z","updated_at":"2015-03-12T13:14:40Z","body":"@pehrlich Thanks for looking into this. Yeah, `redrawCircle` can be optimised, but now I didn't do it yet because circles will be used by `selection` feature. However, there must be something we can do, so I'll work on later. For event rects, umm I don't have any idea, but I'll look into this later as well."}}