dashticz json freezes on ipad and on pc with some browsers

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
al300kr
Posts: 12
Joined: Saturday 22 July 2017 13:50
Target OS: -
Domoticz version:
Contact:

dashticz json freezes on ipad and on pc with some browsers

Post by al300kr »

hello,
dashticz freezes every 5 seconds( with domoticz_refresh=5) and after switch on/off any button.
i have this problem on PC if i use Firefox or Safari, but everything is ok on Chrome.
apple ipad freezes every 5 sec on any browser (safari,chrome,kiosk browser)

i trying to remove different blocks one by one, but it seems that only common count of blocks is important
the more, the more hangs.

when it freezes, browser debug console shows
http://192.168.0.55:8080/json.htm?type= ... order=Name 220ms
http://192.168.0.55:8080/json.htm?type= ... rvariables 230ms

second line was added only in new version of dashticz, and freezes became 2 times longer.

maybe the problem is because i use too much devices in domoticz/dashticz?
i have 400 devices in domoticz, 160 blocks and 4 screens on dashticz
but on PC with Chrome browser -everything is perfect.
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dashticz json freezes on ipad and on pc with some browsers

Post by Lokonli »

That are indeed the two network requests to domoticz, but they are asynchronous, meaning they are executed in the background, and should not create any freeze.
However, not all network requests are asynchronous. Can it be that another network request is causing the delay? frames, buttons, other?
Also if you are using an external cors_proxy could be the reason for freezes.
al300kr
Posts: 12
Joined: Saturday 22 July 2017 13:50
Target OS: -
Domoticz version:
Contact:

Re: dashticz json freezes on ipad and on pc with some browsers

Post by al300kr »

Lokonli thank you for reply,
no more network request during freezing periods(except of requests to domoticz), they exists even when i keep only blocks in CONFIG.js (switches and info sensors from domoticz)
it should be something browser ralated, because chrome on PC works perfect, but i don't understand why Chrome on ipad also freezes.

these freezes are short (0.3-1 sec) but very annoying compared to perfect smooth on chrome (pc)
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dashticz json freezes on ipad and on pc with some browsers

Post by Lokonli »

I don't see any freezes on ipad. How many variables do you have?
You have quite some devices in Domoticz you said. To check whether this creates the delay, you could add a few devices you use to a roomplan in Domoticz, and use the roomplan id in the setting config['room_plan'] in your CONFIG.js (like config['room_plan'] = 2, depending on the id of the roomplan)
al300kr
Posts: 12
Joined: Saturday 22 July 2017 13:50
Target OS: -
Domoticz version:
Contact:

Re: dashticz json freezes on ipad and on pc with some browsers

Post by al300kr »

Lokonli i have ~ 150 different switches and sensors in dashticz and need to add another ~100
just tried to use room_plan ( with~70 sensors)- now json calls takes ~80ms *2, freezes still there(slight), proportionally lower duration comparing to 150 variables
on low amount of variables very difficult to see this problem, and it doesn't cause any discomfort
al300kr
Posts: 12
Joined: Saturday 22 July 2017 13:50
Target OS: -
Domoticz version:
Contact:

Re: dashticz json freezes on ipad and on pc with some browsers

Post by al300kr »

i tried to disable data processing after json in main.js.
Looks like json calls itself doesn't cause this hangs, further processes with data are blocking UI.

Somebody have success story of using dashticz with 150+ variables?
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dashticz json freezes on ipad and on pc with some browsers

Post by Lokonli »

Do you need the variables functionality? We could add a setting to disable it.
al300kr
Posts: 12
Joined: Saturday 22 July 2017 13:50
Target OS: -
Domoticz version:
Contact:

Re: dashticz json freezes on ipad and on pc with some browsers

Post by al300kr »

Lokonli not necessary, thank you.
i was wrong, variables and its json didn't cause any lags.
disabling handleDevice function(and everything that depends on it) in main.js (but keeping json requests) - makes UI smooth(but without any data:)).

maybe Chrome (on PC) uses different thread for JS? i am very interesting, how Chrome on Android tablets handle this (before i will buy it)...
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dashticz json freezes on ipad and on pc with some browsers

Post by Lokonli »

handleDevice indeed handles all device info. But it seems also pretty inefficient, because it seems to create always all html info for all devices and all variables, independent whether the device is used, and independent whether there is a change in data. I can imagine it creates a lag when you have a lot of devices and/or variables.

I'll have a look whether it can be optimized.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest