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

slow API when multiple requests #3160

Closed
joggs opened this issue Aug 17, 2020 · 3 comments
Closed

slow API when multiple requests #3160

joggs opened this issue Aug 17, 2020 · 3 comments

Comments

@joggs
Copy link

joggs commented Aug 17, 2020

Describe the bug

The api is very slow if you send multiple requests.
If you press on and off 10 times each second for a light group with 6 lights, the response time stars to increase alot after just 4 clicks and all of a sudden you have a response time of many many seconds.
The same ofcorse happens if you turn off multiple lights from an external system such as home assistant.
So when I turn off indoor lightng at night, you can stand and watch all lights turning off with seconds in between.
I run deconz on a multithreaded ryzen server where the cpu is almost idle while this happens.

Steps to reproduce the behavior

If the problem is reproducable, list the steps here:

  1. Go to the old phoscon app
  2. Click on and off 10 times on a light group with at least 6 lights
  3. look at the lights response time increasing drastically
    4

If the problem can't be reproduced and is sporadic, please provide some details
on how often and when the issue happens.

Expected behavior

a quick response when sending multiple requests to the api

Screenshots

Environment

  • Host system: PC
  • Running method: Windows
  • Firmware version: 26580700
  • deCONZ version: 2.05.79
  • Device: ConBee II
  • Do you use an USB extension cable: yes

deCONZ Logs

Additional context

@wvuyk
Copy link

wvuyk commented Aug 17, 2020

Sending commands to groups is slower then adressing a light. I think this is caused by the group call being a multicast call.
When I use a group call in the REST API with my plugin, I let a new call wait ca. 0,8 seconds. When I send a direct call for a light, a new call has to wait 0,1 second. I suspect Phoscon is doing a similar delay with sending the commands.
Sending a number of calls, like you are doing by pressing on and off repeatedly is causing a queue to build up, If you manage to send 10 commands in a second, the last command will be send out 8 seconds after you pressed it in my sample.

I think this is caused by the limits of group command handling in Zigbee, and probably not a bug in the REST API?

@stale
Copy link

stale bot commented Sep 7, 2020

As there hasn't been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.

@stale stale bot added the stale label Sep 7, 2020
@stale
Copy link

stale bot commented Sep 15, 2020

As there hasn't been any response in 28 days, this issue will be closed. @ OP: If this issue is solved post what fixed it for you. If it isn't solved, request to get this opened again.

@stale stale bot closed this as completed Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants