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

Avoid running Renderer when WebUI is not shown #1893

Closed
unbeatable-101 opened this issue Aug 12, 2021 · 4 comments
Closed

Avoid running Renderer when WebUI is not shown #1893

unbeatable-101 opened this issue Aug 12, 2021 · 4 comments
Labels
exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue kind/maintenance Work required to avoid breaking changes or harm to project's status quo need/analysis Needs further analysis before proceeding P2 Medium: Good to have, but can wait until someone steps up topic/perf Performance

Comments

@unbeatable-101
Copy link

Is your feature request related to a problem? Please describe.
Using electron takes up a lot of memory compared to other native programs.

Describe the solution you'd like
Write a native app that is only the menubar (e.g. Status, Files, and Peers would open your web browser).

Describe alternatives you've considered
Don't start IPFS Desktop Helper (Renderer) if openWebUIAtLaunch is set to false, rewrite the whole app to be native (Maybe use the bundled WKWebView?)

@unbeatable-101 unbeatable-101 added the need/triage Needs initial labeling and prioritization label Aug 12, 2021
@lidel
Copy link
Member

lidel commented Aug 13, 2021

Not running Renderer when not needed is worth investigating.

IIRC right now we keep an instance of browser window with webui inside of it at all times, which comes at a cpu/memory price. We do switch to a blank page, so Status graphs etc are not rendered, but still, there is an overhead.

I believe it was done this way to make it fast when one Opens ipfs-webui screens via the menu, but perhaps it is no longer necessary?

If someone has time, a PoC PR would be very helpful.

ps. @mvdan created a light rewrite without Electron at: https://github.com/ipfs-shipyard/go-ipfs-desktop – give it a try and report issues/feature requests in that repo – it is unofficial (unsigned) for now, but we want to provide it as alternative to Electron at some point.

@lidel lidel closed this as completed Aug 13, 2021
@lidel lidel reopened this Aug 13, 2021
@lidel lidel added need/analysis Needs further analysis before proceeding exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue kind/maintenance Work required to avoid breaking changes or harm to project's status quo P2 Medium: Good to have, but can wait until someone steps up topic/perf Performance and removed need/triage Needs initial labeling and prioritization labels Aug 13, 2021
@lidel lidel changed the title [macOS] Allow running in menubar only mode Avoid running Renderer when WebUI is not shown Aug 13, 2021
@unbeatable-101
Copy link
Author

ps. created a light rewrite without Electron at: ipfs-shipyard/go-ipfs-desktop – give it a try and report issues/feature requests in that repo – it is unofficial (unsigned) for now, but we want to provide it as alternative to Electron at some point.

Oh nice, this is basically exactally what I wanted

@cyberpunkrocker-zero
Copy link

+1 for Electron-less go-ipfs-desktop! I wanted to use ipfs-desktop on my ageing laptop, but it was using so much resources that it was impossible to keep it running it when the laptop was off AC. Go-ipfs-desktop is a perfect low-power option.

@tinytb
Copy link

tinytb commented Nov 22, 2022

backlog grooming: we are considering and experimenting with alternatives to electron, e.g. here is a basic attempt to use wails instead of electron. Closing this issue, as these efforts will be tracked elsewhere:

@tinytb tinytb closed this as completed Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue kind/maintenance Work required to avoid breaking changes or harm to project's status quo need/analysis Needs further analysis before proceeding P2 Medium: Good to have, but can wait until someone steps up topic/perf Performance
Projects
No open projects
Archived in project
Development

No branches or pull requests

4 participants