Page 1 of 5

Highcharts 'Recent' graphs

Posted: Mon 17 Dec 2012 6:22 pm
by mcrossley
Hmm, looks like Highcharts are too slow when loaded with 48 hrs worth of realtime data at 1 minute updates :(

http://weather.wilmslowastro.com/highch ... Graphs.htm

Re: Highcharts 'Recent' graphs

Posted: Mon 17 Dec 2012 7:03 pm
by steve
Seems OK here?

Re: Highcharts 'Recent' graphs

Posted: Mon 17 Dec 2012 8:45 pm
by tobyspond
Hi Mark,

The graphs are a bit slow on the initial load and fine after that. The graphs not any slower than the WU version of these graphs I have seen other web pages.

Kerry

Re: Highcharts 'Recent' graphs

Posted: Mon 17 Dec 2012 11:07 pm
by mcrossley
The initial data download can be just short of 2 seconds, but subsequent graph data loads are about 300ms (for me, but I'm fairly local :) ). Highcharts then takes about 600ms to render the graph (the Wind Direction plot takes longer because it is drawing all the point 'graphics'). So just around the 'rule' of 3 seconds for a page load.

Edit: This evening I have being playing around with my web server caching responses for various pages - it will ease the load on my laptop, but I may have taken them too far, we'll see...

Re: Highcharts 'Recent' graphs

Posted: Tue 18 Dec 2012 4:28 pm
by mcrossley
OK, I've made some changes, most of the graphs now only pull back every 10th record out of the realtime table.

The Wind Direction graph has a few 'optimisations' applied (switching off stuff like mouse tracking and popup data for each point) and pulls back every other record from the table.

Any quicker/smoother?

You may have to flush your browser caches to pick up the new script, I managed to get a one month cache retention on the scripts for a while :bash:

Re: Highcharts 'Recent' graphs

Posted: Tue 18 Dec 2012 4:42 pm
by water01
Seems fine here about 1-2 second load time.

Re: Highcharts 'Recent' graphs

Posted: Tue 18 Dec 2012 4:56 pm
by KevinF
It's good for me too. When clicking on each variable in quick succession it is very slick, with just a slight stall on wind direction. On the whole a nice piece of presentation that is a joy to look at and explore. BTW my pc is fairly crap in terms of speed.

Re: Highcharts 'Recent' graphs

Posted: Tue 18 Dec 2012 8:30 pm
by thekow
Lot faster than yesterday.

Re: Highcharts 'Recent' graphs

Posted: Tue 18 Dec 2012 9:27 pm
by mcrossley
Added a Solar/UV Graph - but I don't have any data :roll: :lol:

Re: Highcharts 'Recent' graphs

Posted: Tue 18 Dec 2012 9:44 pm
by nitrx
Works fine hand fast on my android tablet , read hand without An h , autocorrection s.. :bash:

Re: Highcharts 'Recent' graphs

Posted: Fri 21 Dec 2012 8:04 pm
by thekow
Does the PHP use the NEW 2.0 import file timestamps?

Re: Highcharts 'Recent' graphs

Posted: Fri 21 Dec 2012 8:27 pm
by mcrossley
It does.

Re: Highcharts 'Recent' graphs

Posted: Fri 21 Dec 2012 9:27 pm
by thekow
Converted my DB over.. just waiting for graphs release :)
I assume this will be using realtime data from mysql.

My current 24 hour graph is using a .txt file.

Re: Highcharts 'Recent' graphs

Posted: Fri 21 Dec 2012 9:37 pm
by mcrossley
Yes they do, I have also converted my 6hr graph to use the MySQL table too, the text log file is now gone.

weather.wilmslowastro.com/realtimeLogSql.php?view=sce

Re: Highcharts 'Recent' graphs

Posted: Fri 21 Dec 2012 9:48 pm
by thekow
Awesome, sounds good to me.