I have a highcharts dashboard that renders very slow. The API serves up the data fast, and I have done some performance profiling and it something to do with rendering.
DATA:
I have radios in different locations logging signals ( beeps ) to a database from a radio. The beeps occur nearly once per second at one of 3 discrete rates 48, 80 or 30 bpm (beeps per minute).
The transmitters are on wildlife that come and go in and out of range on one of 100 possible channels, and for each location I only log signals for 2 hours per day. I then write to a summary table the dominant beep rate for that location and channel for that hour. Logging at 2 hours per day this means I have 2 data points per day per location per channel, or expressed another way for a given channel for a given location there is about 760 data points.
All of this means that the data is not clean and continuous, there can be periods where I may get an hour of data uninterrupted, other times nothing .
DASHBOARD:
I have built a angular dashboard with high charts. Pickers allow the user to pick a single location and date range up to 1 year to display the received signals. Then a page of thumbnail tiles show graphs for each detected channel for that location. In the very unlikely event all 100 channels had valid signals this would be in worst case :
100 tiles x 760 data points per tile (also unlikely a channel would have a data point for every day)
In my testing where I request the maximum selectable range (1 year) I find that the graphs themselves are displayed fastish, but the rendering of the data can take 5-25 seconds depending on the speed of the computer.
WHAT HAVE I TRIED:
- I did try to only plot daily data points, but that made little to no difference.
- In setting up highcharts, the graphs didnt look very good because of the intermittent nature, so I created a method in Angular to fill hours with no data with 0's although thats only costing me 20ms per channel.
code:
https://bpa.st/3SMA