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

Latency on Windows Kinect raw depth feed #77

Open
lisajamhoury opened this issue Jul 10, 2020 · 2 comments
Open

Latency on Windows Kinect raw depth feed #77

lisajamhoury opened this issue Jul 10, 2020 · 2 comments
Assignees

Comments

@lisajamhoury
Copy link
Member

The Windows Kinect raw depth feed lags on the client side (in browser). The Kinectron server sends at around 25 fps, but the client receives at about 2 fps. I think the problem is that the amount of data from the server is overloading the client, because the problem is resolved when I send less data. For example, if I send only half the raw depth data, the sending and receiving fps is the same. Also, the Kinect Azure raw depth image, which is smaller, sends and receives without issue.

@aaronsantiago put in place a system that keeps the server from sending additional data if there is already data in the data channel buffer (see 6ecbee3). This catches excessive data on the way out, but the client still gets overwhelmed.

I did a number of tests on the client side and cannot find where the build up is happening. For now, I've reinstated the frame limiting in the Kinectron server to 15 fps on the raw depth feed as this keeps the client from getting overwhelmed (on my home network, at least).

It does look like there is a memory leak on the client that might be affecting the performance. It's possible the memory leak has to do with setting img.src to dataUrl. I will dig into this issue as a starting place because I cannot find where else the build up on the client is coming from.

@wouterverweirder
Copy link

I ran into a similar memory leak when using data urls for image srcs - blob urls seem to work fine:

https://github.com/wouterverweirder/kinect-azure/blob/dee186167007d0fb53cf5f7004c103c3f6bb7a4e/examples/electron/renderer/demos/color-stream-jpeg.html#L59-L68

@lisajamhoury
Copy link
Member Author

I (implemented blob urls) and am still running into the issue. I will integrate the blob urls anyway in an upcoming refactor bc of the known issues with dataurls. I will also try out a different tool for sending and receiving the data as it seems that the slow down is happening on the network as data is being received.

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