-
Notifications
You must be signed in to change notification settings - Fork 865
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
fix: use blank page when window isn't active #1198
Conversation
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
Looks good! Two questions:
|
It doesn't. We are always on the Web UI, but it's just an empty page.
The problem is that we were, by default, on status page. And when we're on the status page, we're continuously fetching repo and bandwidth stats to update the graphs. That creates load on the Web UI and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm this works on Linux (opened Status page and closed it):
hidden (without fix)
GPU proces still does something, as reported in #1196:
hidden (with fix)
Fix seems to work.
GPU process stays at 0%, renderer is at 0% and jumps to 0.7 only every ~5s seconds
(probably when gets status update from HTTP API?)
Can you file a followup issue in webui repo for reducing the cost of having the status page open? You've reduced the cost on desktop in this PR, which is awesome. But if someone leaves the page open in a tab in the browser, they'll still have the problem. |
@autonome done: ipfs/ipfs-webui#1260! |
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
This addresses #1196 by changing to a blank page whenever the window is not visible. For this, we use the Page Visibility API.
Requires ipfs/ipfs-webui#1259.
This reduced significantly the CPU usage on my end.
License: MIT
Signed-off-by: Henrique Dias hacdias@gmail.com