Closed oobabooga closed 7 months ago
@oobabooga can you try with gradio 4.15.0? I think #7055 might have fixed this.
No the core problem of lagging is not fixed actually, working on it now
You should see better performance once #7084 is in, though CPU usage will still be high.
CPU usage is still high, but I don't experience any UI lag anymore after recent changes. As that was my main concern, I consider this issue resolved.
Describe the bug
During text streaming, the browser uses 100% CPU. This causes an artifact where if the server is streaming fast enough, the frontend will lag behind and will continue streaming for several seconds even if the server gets shut down with Ctrl+C.
This is a severe performance problem with Gradio. See for instance: https://github.com/oobabooga/text-generation-webui/issues/4990
Probably related to https://github.com/gradio-app/gradio/issues/6100#issuecomment-1837402014
I have tried to find a workaround but had no luck other than limiting updates on the server side to no more than 5 per second.
Have you searched existing issues? π
Reproduction
Run the script below, send a message, and look at the terminal. It will print
done
but the browser will still be streaming new content.Look at the CPU utilization in the task manager or
htop
and it will be at 100%.Screenshot
No response
Logs
No response
System Info
Severity
I can work around it