ipfs-desktop icon indicating copy to clipboard operation
ipfs-desktop copied to clipboard

Avoid running Renderer when WebUI is not shown

Open unbeatable-101 opened this issue 2 years ago • 3 comments

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 avatar Aug 12 '21 02:08 unbeatable-101

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 avatar Aug 13 '21 13:08 lidel

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

unbeatable-101 avatar Aug 13 '21 14:08 unbeatable-101

+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.

cyberpunkrocker-zero avatar Nov 15 '21 19:11 cyberpunkrocker-zero

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:

  • https://github.com/ipfs/ipfs-desktop/issues/2184
  • https://github.com/ipfs/ipfs-desktop/issues/867

tinytb avatar Nov 22 '22 16:11 tinytb