Browser CPU increases over time when streaming
- 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:

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
Assessment
This issue has not been assessed yet.