grpc / grpc/grpc-web

Browser CPU increases over time when streaming

Open
#714 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
9.3k
Forks
802
Avg merge
1d 7h
Merged PRs (30d)
5

Description

Hi, thanks for a great piece of work!

We've noticed that for constant message frequency and size the browser CPU continues to increase until eventually the browser (Chrome latest) is unusable. Using grpc-web 1.0.7.

You can see the effect below:
![image](https://user-images.githubusercontent.com/37167554/73033231-3a30ee80-3ea6-11ea-9094-90b02dbf1caa.png)

This is using the existing helloworld example in the grpc-web repo with minor modifications to send at a set frequency and message size. More details on the approach can be read here: https://github.com/rocos-yishi/grpc-web/wiki/Demo-Project-Changes

The commit with the modifications you can use to reproduce is here: https://github.com/rocos-yishi/grpc-web/commit/4118fb6fa436b56800bc8dc89cbb77fc06955637

It can be worked around by periodically closing the server stream and re-requesting one, though obviously this is sub-optimal. Our product deals with high frequency streams of data displayed in the browser so this issue is a bit of a killer for us.

Let us know how we can help or provide further information, thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.