Channel with 8 fields and Matlab visualizations makes browser crash or extremely slow | ThingSpeak API | Forum

Avatar

Please consider registering
Guest

Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

Register Lost password?
sp_Feed sp_TopicIcon
Channel with 8 fields and Matlab visualizations makes browser crash or extremely slow
Avatar
rodri
Italy

Silver
Forum Posts: 19
sp_UserOfflineSmall Offline
1
November 13, 2017 - 5:14 am
sp_Permalink sp_Print

Hi, 

I have a public channel from my weather station with 8 fields and many Matlab visualizations. The channel number is 60917.

While updating the website, it makes browser crash or update data really slow.

I tried reducing the amount of points to display on each field but it doesn't change anything.  

Is it possible to light the channel? Do I have to delete Matlab visualizations?

Best,

Rodrigo

Avatar
cstapels

Gold
Forum Posts: 83
sp_UserOfflineSmall Offline
2
November 13, 2017 - 9:58 am
sp_Permalink sp_Print

I checked out your channel, that is a pretty awesome collection of visualizations.  I think the problem has to do with the plugins. "Temperature on each Pagoda", "Humidity Comparison", "Pressure Comparison" and "Rain comparison".  Can you try removing these four plugins? Your performance should improve drastically. 

You can replace these plugins with standard MATLAB visualizations, for example using thingSpeakPlot() or thingSpeakPlotYY(), or plot(). You can get multiple series with thingSpeakPlotYY(X1,Y1,X2,Y2) or plot(x1,y1,x2,y2).  The plugin is completing with the thingSpeak field plots for the same data which is slowing down your performance.

Avatar
rodri
Italy

Silver
Forum Posts: 19
sp_UserOfflineSmall Offline
3
November 14, 2017 - 8:25 am
sp_Permalink sp_Print

Hi cstapels, thanks for your reply.

Actually I have another channel without plugins and the performance is the same... I think it is the amount of points on each plot or the live update which make it slow.

Avatar
cstapels

Gold
Forum Posts: 83
sp_UserOfflineSmall Offline
4
November 14, 2017 - 8:53 am
sp_Permalink sp_Print

Is it possible for you to share the other channel with me privately so I can compare them and help you troubleshoot the issues?  You can add my user name here @ mathworks dot com to the sharing tab. Or if it is also a public channel, can you just send me the channel number? 

Avatar
cstapels

Gold
Forum Posts: 83
sp_UserOfflineSmall Offline
5
November 14, 2017 - 4:19 pm
sp_Permalink sp_Print

We spent some more time looking at the channel 60917. It looks like you are displaying a large number of points in multiple fields.  The result is that the client (your browser) is having to do a lot of work each time you scroll or update the page, leading to the performance hit you see.  After some experimentation, I agree that it wasn't the java plugins that were causing the biggest frag.

The number of points you are using may even be larger than the browser and display can accurately show.  If you do not want to reduce the total number of points displayed, you might consider setting the "average" value in the options for your field plots to 60 minutes.  Click the pencil icon on the top of the field plot to access these settings, there is a drop down menu on the right hand side for 'Average".  The field plot will only show an average value for each hour of data.  If you need more fidelity for a particular view, you could decrease both the averages and the number of points for a specific subset to maintain the responsiveness.  

If this suggestion is consistent with your needs, can you try it and let us know how it works?

Avatar
rodri
Italy

Silver
Forum Posts: 19
sp_UserOfflineSmall Offline
6
November 15, 2017 - 1:00 pm
sp_Permalink sp_Print

Yes much better with the average!! Thank you

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online: S Raj
19 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 250

Vinod: 154

cstapels: 83

piajola: 75

vespapierre: 63

Adarsh_Murthy: 59

Newest Members:

S Raj

Farrukh

webone

KMVp

aamir786

sugengprayogi

Forum Stats:

Groups: 4

Forums: 17

Topics: 1289

Posts: 4481

 

Member Stats:

Guest Posters: 1

Members: 5653

Moderators: 0

Admins: 2

Administrators: Hans, lee