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

chart performance #144

Open
jjssoftware opened this issue Jan 6, 2017 · 11 comments

Comments

Projects
None yet
6 participants
@jjssoftware
Copy link

commented Jan 6, 2017

node v6.9.1
node-red v0.15.2
node-red-dashboard v2.2.1

There were no takers to this comment on slack: https://node-red.slack.com/archives/general/p1483395921001718

For anyone here using the node-red-dashboard chart node - have you ever seen a performance issue on initial page load with a small(ish) number of points? Let's say 1500 points on a line chart.

Is this a known issue?

Cheers
Joe

@Paul-Reed

This comment has been minimized.

Copy link

commented Jan 6, 2017

Hi Joe, I did read the post on slack, but assume that you didn't get a reply because nobody else is seeing this as an issue.
I'm loading a similar number of datapoints, with no problems.

@jjssoftware

This comment has been minimized.

Copy link
Author

commented Jan 6, 2017

Cheers Paul for responding. Not a known issue then. In fact it's the opposite of that, it's all good and it must somehow be me 😀

@dceejay

This comment has been minimized.

Copy link
Member

commented Jan 6, 2017

loads of points can always be a problem - see this thread on the mailing list
https://groups.google.com/forum/#!topic/node-red/shZxX9ySZkQ

@jjssoftware

This comment has been minimized.

Copy link
Author

commented Jan 6, 2017

aha thanks for the heads up Dave. Time rewind..a known issue it is.

In my case I saw this phenomenon when I had a bug in my flow causing a new message to flow into the chart every minute rather than on state change. After about a day, chart initial page load had pretty much ground to a halt in mobile Chrome latest (v55) on Android 6.0.1 running on a reasonably specced OnePlus 2 handset.

I fixed my flow bug, data point volume is now hugely reduced and I no longer have an issue.

I'll let you project owner / maintainer type guys decide whether you want to close this issue down or if you prefer to leave it open.

Cheers
Joe

@dmdelorme

This comment has been minimized.

Copy link

commented Jan 13, 2017

I am a loss about what is going on. the data amount is not that large (size but it chokes the system ie node-red..
very frustrating.
I have the same problem with another web app not relate to node-red.. +10000 data points, it might be cheaper CPU wise to generate a png. it seems weird that i can stream netfilx but crap out on a few thousand data points.
Or am i missing something?

@dreamfalcon

This comment has been minimized.

Copy link

commented Feb 11, 2017

Same problem here in a galaxy s6.
The performance of the charts is very bad comparing with CanvasJS that I use in my applications. Can draw 100.000 points in a few milliseconds.
With node red I have to limit at 1000 points in order to have a acceptable experience.

@dceejay

This comment has been minimized.

Copy link
Member

commented Feb 13, 2017

Hi - would really appreciate someone else getting involved in this. How do you manage so many points dynamically ? how do you trim the array size ? (either by time or number of points).How do you re-sync front and back end for page refreshes / late joiners and then continue to add points dynamically (without sending the whole array every time).

@jjssoftware

This comment has been minimized.

Copy link
Author

commented Feb 14, 2017

@dceejay I'm not entirely sure what group of people your last comment was intended for. So far I've seen nothing to suggest that node-RED users are resolving this problem by doing special things with chart data in this issue, in the google mailing list or in slack. Is anyone developing custom node-RED nodes on the server side or manipulating chart render with the chart JS code on the client side to work around this issue?

Perhaps you intended for your comment to be a call for help to anyone with general chart.js experience with angular? If so that type of request might work better here: https://github.com/chartjs/Chart.js/issues

@dceejay

This comment has been minimized.

Copy link
Member

commented Feb 14, 2017

Well it's intended for anyone reading this issue who may have some time to offer suggestions and help. Can't think it's a generic charts.js issue as prior to moving to it people were saying how great it was... so must be something about the way we are using it.

@dceejay

This comment has been minimized.

Copy link
Member

commented Aug 29, 2017

This 5d20ac6 using a newer more direct format should be better...

BUT still more could be done re handling of the underlying websocket

@QAnders

This comment has been minimized.

Copy link

commented Feb 18, 2018

For anyone stumbling upon this and are running on a Raspberry PI/Beaglebone, etc. with limited memory (e.g. 1 GB for the Raspberry PI), run your Node-red with flag --node-args="--max-old-space-size=256" to limit the memory the Node-red can munch!
(And use the Delay Node to slow down any sensors publishing more often than once a second!)
(In newer Node-RED versions there is a "Delay" node...)

It runs perfectly after adding the memory restriction!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.